Configuration Data
Allow your users to obtain configuration details that include the various limits that apply to emails.
Get Configuration Data
A call to getConfigurationData
returns the various limits applied to email sending and receiving, as well as the limits applied to email management.
// Interface representing the configuration data returned
export interface ConfigurationData {
deleteEmailMessagesLimit: number
updateEmailMessagesLimit: number
emailMessageMaxInboundMessageSize: number
emailMessageMaxOutboundMessageSize: number
emailMessageRecipientsLimit: number
encryptedEmailMessageRecipientsLimit: number
}
try {
const configurationData = await emailClient.getConfigurationData()
// `configurationData` contains the various limits configured for emails.
} catch {
// Handle/notify user of errors
}
do {
let configurationData = try await emailClient.getConfigurationData()
// `configurationData` contains the following properties:
/// The number of email messages that can be deleted at a time.
/// public var deleteEmailMessagesLimit: Int
/// The number of email messages that can be updated at a time.
/// public var updateEmailMessagesLimit: Int
/// The maximum allowed size of an inbound email message.
/// public var emailMessageMaxInboundMessageSize: Int
/// The maximum allowed size of an outbound email message.
/// public var emailMessageMaxOutboundMessageSize: Int
/// The maximum number of recipients for an out-of-network email message.
/// public var emailMessageRecipientsLimit: Int
/// The maximum number of recipients for an in-network encrypted email message.
/// public var encryptedEmailMessageRecipientsLimit: Int
} catch {
// Handle/notify user of errors
}
launch {
try {
val configurationData = withContext(Dispatchers.IO) {
emailClient.getConfigurationData()
}
// The [configurationData] is returned which contains the following properties:
// * deleteEmailMessagesLimit: The number of email messages that can be deleted at a time.
// * updateEmailMessagesLimit: The number of email messages that can be updated at a time.
// * emailMessageMaxInboundMessageSize: The maximum allowed size of an inbound email message.
// * emailMessageMaxOutboundMessageSize: The maximum allowed size of an outbound email message.
// * emailMessageRecipientsLimit: The maximum number of recipients for an out-of-network email message.
// * encryptedEmailMessageRecipientsLimit: The maximum number of recipients for an in-network encrypted email message.
} catch (e: EmailConfigurationException) {
// Handle/notify user of exception
}
}
Last updated