Utilizing Gmail SMTP for cost-free email transmission from AEM.


This article provides instructions on how to enable Gmail SMTP for Adobe Experience Manager (AEM) to send emails at no cost. The functionality proves valuable to developers who wish to begin working on local code for email transmission or explore email-related features in AEM, such as “Sharing Asset Links” and “Asset Share commons”.

Before proceeding, it is highly advisable to utilize a dedicated Google account specifically designated for AEM development. Once the account is properly configured, it can serve as an SMTP server, facilitating cost-free email transmission.

Setting up dedicated Google Account

To create cost-free SMTP credentials for Gmail using App Passwords, follow these steps:

  • Ensure you have a Gmail account dedicated to your development efforts. If you don’t have one, create a new Gmail account.
  • Enable 2-step verification for your Gmail account. This adds an extra layer of security to your account. You can enable it by visiting the Google Account Security page at Google Account and clicking on the “2-Step Verification” option. Follow the prompts to set it up.
  • Navigate to the “Security” tab. Look for the section titled “How you sign in to Google” and click on the arrow next to it. Scroll down to the bottom to find the “App Passwords” option.
  • On the “App Passwords” page, scroll down to the “Select app” dropdown menu and choose “Other (Custom name)”.
  • Enter a name for your application, such as “AEM SMTP” or any other name that helps you identify it.
  • Click on the “Generate” button.
  • A unique 16-character password will be generated for your application. Note down this password as it will be used as your SMTP credentials.

Remember that these App Passwords are specifically for SMTP use and do not grant access to your Google account settings or other Google services. If you want to revoke or manage these App Passwords later, you can do so from the “App Passwords” page in your Google Account Security settings.

Configure AEM with Gmail SMTP credentials

In your AEM configure the SMTP settings to use the following details:

Service name: Day CQ Mail Service

  • SMTP Server: smtp.gmail.com
  • SMTP Port: 587
  • Username: Your full Gmail address (e.g., example@gmail.com)
  • Password: The 16-character app password generated in step 7.
  • Enable TLS encryption for secure communication.

Save the changes in your code, and you should now be able to send emails through Gmail’s SMTP server using the App Password as your credentials.

For quick validation, try sharing “Asset Link” of an asset with any email account

Leave a comment