Expand my Community achievements bar.

Email Integration with OAuth SMTP

Avatar

Level 4

2/9/25

Email Integration with OAuth SMTP

  by Ashwini Sathe

Overview

AEM as a Cloud Service offers OAuth 2 support for its integrated Mail Service to allow organisations to adhere to secure email requirements. AEM’s DefaultMailService supports both Basic and OAuth 2 authentication. Basic authentication is easy to achieve but might not support modern security requirements. OAuth 2 is more secure than basic authentication.

OAuth 2 support is available in AEM for multiple email providers like gmail, outlook etc. Here we will be mainly focusing on Microsoft Office 365 Outlook.

Before we start with the setup, we need to consider below requirements

  • Is client SMTP public/internet or private/intranet? — If it is public, then we have to enable flexible egress in advanced networking on AEM as a Cloud Service. If it is private, then dedicated egress needs to be enabled and the dedicated IP needs to be whitelisted.
  • Which SMTP port? — SMTP on ports 25/587/468 needs to be enabled by port forward proxy, as by default https is enabled on port 80/443 in AEM.

Setup involves following steps:

  1. Setup SMTP on Azure to use Oauth for Outlook.
  2. Setup on AEM using Oauth Provider and Day CQ mail service configurations.
  3. Setup Advanced networking on AEM cloud manager for port forwarding
For details please visit: https://medium.com/activate-aem/email-integration-with-oauth-smtp-e4ccc6ff250d

Q&A

Please use this thread to ask questions relating to this article