Send Custom Email in AEM
- Khanna
- Aug 6, 2018
- 1 min read
For sending email to external ids, use Day CQ Mail Service in your local AEM set up using an existing Gmail account.
Requirement: On submission of a feedback form send a mail to backend team.
Navigate to
http://localhost:4502/system/console/configMgr
Open Day CQ Mail Service and configure the following properties.
smtp.host -> smtp.gmail.com [Mailer uses this to send mails]
smtp.port -> 465 [port number to connect with smtp server]
smtp.user -> any gmail account id [user for authentication through smtp]
smtp.password -> password of above account [password for authentication through smtp]
from.address -> "From:" field of messages sent by the mailer
smtp.ssl -> If checked, an SSL connection is set up.
debug.email -> if checked you can debug emails in operating system terminal that runs Sling.

Create an HTML template at
/etc/notification/email/html/en.html

Email Service
Servlet
Note:
If still you are unable to send emails.
Please navigate to
http://localhost:4502/system/console/configMgr
Adobe Granite CSRF Filter and remove POST
Apache Sling Servlet and Script Resolver check if execution path has your servlet path
Apache Sling Referrer Filter and remove POST
If on publish email is not being send please allow anonymous access by registering your servlet path in Apache Sling Authentication Service
Comments