Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

AEM Email Custom Template

Avatar

Community Advisor

2/29/24

 
Imran__Khan_1-1709202639571.png

 

AEM Email Custom Template

  by @Imran__Khan 

Overview

AEM Email Custom Template

 

This blog will help us get an overall understanding of sending emails with custom templates (content, style, and attachments) with the help of the EmailService API provided by ACS Commons.

 

ACS Commons EmailService internally uses the OOTB MessageGateway service to send an email from the com.day.cq.mailer package. ACS Commons simplified the process in terms of sending an email through the EmailService API.

 

We will be covering the following topics as part of this blog:

  • Sending Emails using the EmailService
  • Apply CSS or style as part of the email.
  • OSGI configurations are required to send emails.
  • Send attachments as part of the email.
  • acs-commons-email-service System Service User

Q&A

Please use this thread to ask questions relating to this article

1 Comment

Avatar

Community Advisor

5/6/24

This is an interesting read @Imran__Khan! Thanks!

I once had a use case in the project wherein the requirement was to have an authorable email template.

We ended up using jsoup library to parse the entire HTML of the template to be sent as email.

For an authoring controlled email content - what do you think would be best way to implement?