Hi all,
When trying to send out emails via AEM using message Gateway service (Emails configured via CQ Mail Service)
when inspecting on web mail applications there are lot of nested <div> which have no occurrence in the original html.
any suggestions on why this would be happening?
@arunpatidar, @EstebanBustamante, @Raja_Reddy
Solved! Go to Solution.
Views
Replies
Total Likes
Email email = new HtmlEmail();
Can you try changing the Email class to HtmlEmail class?
org.apache.commons.mail package has the below classes -
HtmlEmail has start string has <html><body><pre>
Thanks,
Rohan Garg
Hi @aem_noob , Are you using any customized email template or OOTB email template. If you are using customized template please check the template structure.
Please refer for more details on email templates,
https://medium.com/@toimrank/aem-email-custom-template-style-and-attachment-d4c0a196ec98
we're using custom email templates.
We checked the template structure but there is nothing in the markup for the page when seen on view as published.
It is only when viewing the mail we see empty spaces.
@aem_noob can you please check whether your template is following all the required configurations mentioned in https://experienceleague.adobe.com/en/docs/experience-manager-65/content/sites/administering/operati...
if it possible can you please share the template?
@sravswe are using custom template which is basically a page created from an email based template. We are using dynamic as well as static strings along with proprietary header footer icons. All of the page is rendering correctly save the empty strings.
we are converting the html page to java string using jsoup and then sending it over email.
Is it an HTML Email or Text Based Email?
not sure, we are using the below code snip -
public void sendEmail(String contentEmail, String userName, String subjectLine, List<String> emailRecipients) throws EmailException, AddressException {
Email email = new HtmlEmail();
email.setCharset(Constants.CHARACTER_ENCODING_UTF_8);
email.setFrom(Constants.FROM_EMAIL);
Email email = new HtmlEmail();
Can you try changing the Email class to HtmlEmail class?
org.apache.commons.mail package has the below classes -
HtmlEmail has start string has <html><body><pre>
Thanks,
Rohan Garg
thank you so much!
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies