> This page is for Docs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Configure the external SMTP server settings for Microsoft 365

> Learn how to configure external SMTP server settings for Microsoft 365.

Learn how to configure external SMTP server settings for Microsoft 365.

Complete [Create an OAuth 2.0 Provider using the Authentication Code grant type](/docs/platform/extensibility/events-and-notifications/configure-email-settings/configure-external-smtp-servers-for-microsoft-365-using-oauth/create-an-oauth-2-0-provider-using-the-authentication-code-grant-type).

Navigate to **Events notifications entry** in the left navigation menu.

Click the **Settings** tab.

In the **Email Settings** section, click the **External SMTP** tab and then click **Edit**.

Fill in the fields with the values in the following table. For more information about these fields, see [Configure external SMTP server](/docs/platform/extensibility/events-and-notifications/configure-email-settings/configure-external-smtp-server).

<table>
  <tr>
    <th>
      Field
    </th>

    <th>
      Value
    </th>

    <th>
      Note
    </th>
  </tr>

  <tr>
    <td>
      SMTP Server Name
    </td>

    <td>
      smtp.office365.com
    </td>

    <td />
  </tr>

  <tr>
    <td>
      SMTP Port
    </td>

    <td>
      587
    </td>

    <td />
  </tr>

  <tr>
    <td>
      SMTP Enable StartTLS
    </td>

    <td>
      true
    </td>

    <td />
  </tr>

  <tr>
    <td>
      Authentication
    </td>

    <td>
      OAuth 2.0
    </td>

    <td />
  </tr>

  <tr>
    <td>
      SMTP User Name
    </td>

    <td>
      \<username>
    </td>

    <td>
      Username of the logged-in user in Azure AD when the OAuth access token is generated.

      Ensure that your Azure AD user account is only assigned to limited groups. Otherwise, the size of generated access tokens grows and might cause errors. For more information, see Prerequisites in [Create an OAuth 2.0 Provider using the Authentication Code grant type](/docs/platform/extensibility/events-and-notifications/configure-email-settings/configure-external-smtp-servers-for-microsoft-365-using-oauth/create-an-oauth-2-0-provider-using-the-authentication-code-grant-type).
    </td>
  </tr>

  <tr>
    <td>
      OAuth2.0 Provider
    </td>

    <td>
      \<oauth 2.0 provider>
    </td>

    <td>
      From the dropdown list, select the OAuth 2.0 provider created for Microsoft.
    </td>
  </tr>

  <tr>
    <td>
      SMTP SocketFactory Port
    </td>

    <td>
      (leave blank)
    </td>

    <td />
  </tr>

  <tr>
    <td>
      SMTP SocketFactory Class
    </td>

    <td>
      (leave blank)
    </td>

    <td />
  </tr>

  <tr>
    <td>
      SMTP SocketFactory Fallback
    </td>

    <td>
      (leave blank)
    </td>

    <td />
  </tr>
</table>

Click **Test Connection And Save**. The data is saved if the connection is successful. If an error occurs, it suggests that the configuration information is not valid and a corresponding error message appears. For more information about error messages and resolutions, see [Common error messages and actions](/docs/platform/extensibility/events-and-notifications/configure-email-settings/configure-external-smtp-server/common-error-messages-and-actions-for-external-smtp-server).

Select the **Select External SMTP Server** checkbox.