> For the complete documentation index, see [llms.txt](https://docs.sudoplatform.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sudoplatform.com/guides/email/integrate-the-email-sdk/configuration-data.md).

# Email Service Configuration

## 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.  This data is useful when building client side UX that prevents users from exceeding service limits.

{% tabs %}
{% tab title="TypeScript" %}

```typescript
// 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
}
```

{% endtab %}

{% tab title="Swift" %}

```swift
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
}
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
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
    }
}
```

{% endtab %}
{% endtabs %}
