I have a form with the submit action set to "Send email" and the email template path set to a .txt file under /libs/fd/dashboard/templates/email. The email is always sent with the content type text/plain instead of text/html. For the contents of the template, I have tried multiple things: copying that of htmlEmailTemplate.txt, editing that to include only a simple test <div>, replacing everything with a full HTML page (starting with DOCTYPE), etcetera. I'm using AEM 6.5.13.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @wizard04wsu,
Adobe CQ Form Mail Servlet handles the Mail Action type of Form Container (see implementation in the com.day.cq.wcm.foundation.forms.impl.MailServlet).
Based on its implementation, it can send 2 types of emails:
To send an HTML email, you need to use org.apache.commons.mail.HtmlEmail.
There is a good AEM Email API provided by ACS Commons: https://adobe-consulting-services.github.io/acs-aem-commons/features/e-mail/email-api/index.html. It allows you to use different email templates persisted in the repository, to send attachments etc.
I see 2 options for you:
I would suggest implementing option 1 because it won't affect OOTB code and will work separately.
Views
Replies
Total Likes
Hi @wizard04wsu,
Adobe CQ Form Mail Servlet handles the Mail Action type of Form Container (see implementation in the com.day.cq.wcm.foundation.forms.impl.MailServlet).
Based on its implementation, it can send 2 types of emails:
To send an HTML email, you need to use org.apache.commons.mail.HtmlEmail.
There is a good AEM Email API provided by ACS Commons: https://adobe-consulting-services.github.io/acs-aem-commons/features/e-mail/email-api/index.html. It allows you to use different email templates persisted in the repository, to send attachments etc.
I see 2 options for you:
I would suggest implementing option 1 because it won't affect OOTB code and will work separately.
Views
Replies
Total Likes
I will give that a try! Thank you for the guidance.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies