> For the complete documentation index, see [llms.txt](https://atlas.anywhere.now/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://atlas.anywhere.now/channels-integrations/text-channels/email.md).

# Configure email for WebAgent

Configure Email Dialogue Provider with Microsoft Graph for WebAgent email handling.

Configure Email Dialogue Provider when agents handle email dialogues in WebAgent.

## Prerequisites

* The [shared omnichannel licensing prerequisites](/channels-integrations/text-channels.md#licensing-prerequisites) are confirmed.
* A Microsoft 365 mailbox is available for the channel.
* Microsoft Graph access is approved for the environment.
* Microsoft Entra ID application values are available for the provider.
* Dialogue Manager is configured for text-channel handling.
* The UCC has the skills and agent assignments required for email dialogues.

{% hint style="info" %}
Microsoft Graph configuration uses environment-specific Microsoft Entra ID values. Use the tenant, client, and secret values supplied for the customer environment.
{% endhint %}

## Configure Microsoft Graph settings

Configure Email Dialogue Provider with Microsoft Graph using tenant, client ID, mailbox, and approved secret-handling settings.

1. Request Email Dialogue Provider enablement through the current delivery/support process for the customer environment.
2. Confirm that the provider settings are provisioned for the target UCC.
3. Open the active configuration source for the environment.
4. Enter the Microsoft Graph tenant, client, secret, and mailbox values supplied for the environment.
5. Enable the provider for the UCC.
6. Save the provider settings.

| Setting                 | Use                                                                                                 | Value guidance                                                        |
| ----------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `Type`                  | Selects the configuration type                                                                      | Use the Microsoft Graph configuration type approved for the provider. |
| `Tenant`                | Identifies the Microsoft Entra tenant                                                               | Use the tenant value supplied for the environment.                    |
| `ClientId`              | Identifies the app registration used by the provider                                                | Use the client ID supplied for the environment.                       |
| `ClientSecret`          | Authenticates the provider when this value is supplied through the approved secret-handling process | Prefer managed or encrypted secret handling.                          |
| `EncryptedClientSecret` | Stores the encrypted secret value                                                                   | Use when the environment supplies an encrypted secret.                |
| `EmailAddress`          | Identifies the mailbox used by the provider                                                         | Use the Microsoft 365 mailbox address for the channel.                |
| `Enabled`               | Enables the provider                                                                                | Use the value approved for the UCC.                                   |

## Configure channel behavior

After the Graph settings are available:

1. Confirm the mailbox that receives customer email.
2. Confirm that provider settings are stored in the active Admin Portal / ListsPlugin-backed configuration flow, delivery-owned configuration record, or service configuration for the environment.
3. Add the provider endpoint to the relevant ListsPlugin endpoint configuration.
4. Create or confirm the email skill.
5. Assign the skill to the agents who handle email dialogues.
6. Add the required email plugin attributes and plugin flow settings for the UCC.

## Configure optional email behavior

Use optional email behavior only when the environment owner confirms that it is required. Configure these settings through the active Admin Portal / ListsPlugin-backed configuration flow or through delivery-owned service configuration for the environment.

{% hint style="warning" %}
Do not use legacy SharePoint Plugin Settings navigation as the default cloud procedure unless support instructs you to use it for the customer environment.
{% endhint %}

### Reply and forward thread history

By default, Email Dialogue Provider does not include the previous message thread when an agent replies to or forwards an email.

| Setting                     | Default | Use                                                                      |
| --------------------------- | ------- | ------------------------------------------------------------------------ |
| `AddMessageThreadToReply`   | `False` | Includes the previous message thread in replies when enabled.            |
| `AddMessageThreadToForward` | `False` | Includes the previous message thread in forwarded messages when enabled. |

Keep these settings disabled when the environment should avoid repeating earlier email content in outbound messages.

### Email font and style

Use `SpanStyle` to apply inline CSS declarations to outbound email text generated by the provider.

| Setting     | Use                                           | Value guidance                                                                                                |
| ----------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `SpanStyle` | Applies inline styling to outbound email text | Use concise CSS declarations approved for the customer environment, such as font family, font size, or color. |

Email clients can render HTML and CSS differently. Validate the resulting email in the mail clients used by the customer before treating the style as final.

### Inbox subfolder handling

Use inbox subfolder settings when the provider must read email from a folder below the mailbox inbox instead of the inbox root.

| Setting                                   | Use                                         | Value guidance                                                                               |
| ----------------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `InboxSubfolder`                          | Reads messages from a named inbox subfolder | Enter the first subfolder name below the inbox.                                              |
| `InboxSubfolder1`, `InboxSubfolder2`, ... | Reads from deeper nested subfolders         | Use numbered settings for deeper folder levels when the environment requires nested folders. |

Keep the folder structure simple where possible. If Outlook rules move messages into subfolders before the provider reads them, confirm that the configured folder path matches the active mailbox rules.

### Send-timeout behavior

Use `MessagesToSendPerPoll` to limit how many outbound email messages the provider sends during each poll cycle.

| Setting                 | Default | Use                                                                        |
| ----------------------- | ------- | -------------------------------------------------------------------------- |
| `MessagesToSendPerPoll` | `10`    | Controls how many pending outbound email messages are sent per poll cycle. |

### Limit new email conversations

Use `ItemsInQueueThreshold` when the Email Dialogue Provider must dampen new email intake while the text queue is already large. This setting limits new email conversations only; replies to existing email conversations are still read first so active customer threads can continue.

| Setting                 | Default | Use                                                                                                                    |
| ----------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
| `ItemsInQueueThreshold` | `950`   | Reads new email conversation messages only while the number of active text-handling items remains below the threshold. |

Keep `ItemsInQueueThreshold` lower than the Dialogue Manager `RestoreThreshold` so restored sessions can be processed before the provider pulls in more new email conversations. Increasing the threshold can affect platform performance; change it only with support or delivery guidance.

Before disabling or changing a configured mailbox, confirm that no unsent outbound messages remain for that provider.

## Optional settings reference

Use this compact reference when reviewing which optional settings apply to an email channel.

| Setting                                   | Area                      | Default              | Notes                                                                           |
| ----------------------------------------- | ------------------------- | -------------------- | ------------------------------------------------------------------------------- |
| `AddMessageThreadToReply`                 | Reply history             | `False`              | Enable only when replies should include the previous message thread.            |
| `AddMessageThreadToForward`               | Forward history           | `False`              | Enable only when forwarded messages should include the previous message thread. |
| `SpanStyle`                               | Font and style            | Environment-specific | Use concise CSS declarations and validate rendering in customer mail clients.   |
| `InboxSubfolder`                          | Inbox subfolder handling  | Environment-specific | Reads from a named inbox subfolder.                                             |
| `InboxSubfolder1`, `InboxSubfolder2`, ... | Nested subfolder handling | Environment-specific | Use numbered settings for deeper folder levels.                                 |
| `MessagesToSendPerPoll`                   | Send-timeout behavior     | `10`                 | Controls how many outbound messages are sent per poll cycle.                    |

## Validate email handling

1. Send a test email to the Microsoft 365 mailbox.
2. Confirm that the dialogue appears in WebAgent.
3. Reply from WebAgent.
4. Confirm that the reply is delivered from the expected mailbox.
5. If optional settings are configured, validate the matching behavior, such as thread inclusion, subfolder pickup, outbound styling, or send throughput.

Then validate the agent workflow in [Handle email dialogues](/use/handle-conversations/webagent/handle-email-dialogues.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://atlas.anywhere.now/channels-integrations/text-channels/email.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
