An email template is simply a text file located in the AEM JCR. For example, consider the following template.
<html>
<body>
<p>
<b>Time:</b> ${time}
Forum URL: ${host.prefix}${forum.url}
</p>
A new reply was posted by ${modifiedBy.fullname} for CQ Forum topic "${topic.subject}".
-------------------------------------------------------------------------------------
${post.message}
-------------------------------------------------------------------------------------
This is an automatically generated message. Please do not reply.
Please follow this link to view all replies to this topic.
${host.prefix}${topic.url}
</body>
</html>
Email templates are located at the following JCR location:
/etc/notification/email
An email template is a JCR node of type nt:file. Each node has a text file as shown in the following illustration.
This development article discusses how to programmatically send an AEM email message that is based on a template. Furthermore, it also discusses how to populate the variables in the template with values. To send email messages that are based on AEM email templates, you use the MessageGatewayService API.
To read this development article, click https://helpx.adobe.com/experience-manager/using/htl_email_template.html.
To read this development article, click https://helpx.adobe.com/experience-manager/using/htl_email_template.html.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.