Configuring Email Notification
- Topics:
- Administering
CREATED FOR:
- Admin
AEM sends email notifications to users who:
-
Have subscribed to page events, for example modification or replication. The Notification Inbox section describes how to subscribe to such events.
-
Have subscribed to forum events.
-
Have to perform a step in a workflow. The Participant Step section describes how to trigger email notification in a workflow.
Pre-requisites:
- The user(s) needs to have a valid email address defined in his profile.
- The Day CQ Mail Service needs to be properly configured.
When a user is notified, he receives an email in the language that is defined in his profile. Each language has its own template that can be customized. New email templates can be added for new languages.
Configuring the Mail Service
For AEM to be able to send emails, the Day CQ Mail Service needs to be properly configured. You can view the configuration in the Web console. When working with AEM there are several methods of managing the configuration settings for such services; see Configuring OSGi for more details and the recommended practices.
The following constraints apply:
-
The SMTP server port must be 25 or higher.
-
The SMTP server host name must not be blank.
-
The “From” address must not be blank.
To help you debug an issue with the Day CQ Mail Service, you can watch the logs of the service:
com.day.cq.mailer.DefaultMailService
The configuration looks as follows in the Web console:
Configuring the Email Notification Channel
When you subscribe to either page or forum events notifications, the from-email address is set to no-reply@acme.com
per default. You can change this value by configuring the Notification Email Channel service in the Web Console.
To configure the from-email address, add a sling:OsgiConfig
node to the repository. Use the following procedure to add the node directly using CRXDE Lite:
-
In CRXDE Lite, add a folder named
config
below your application folder. -
In the config folder, add a node named:
com.day.cq.wcm.notification.email.impl.EmailChannel
of typesling:OsgiConfig
-
Add a
String
property to the node namedemail.from
. For the value, specify the email address that you want to use. -
Click Save All.
Use the following procedure to define the node in your content package source folders:
-
In your
jcr_root/apps/*app_name*/config folder
, create a file namedcom.day.cq.wcm.notification.email.impl.EmailChannel.xml
-
Add the following XML to represent the node:
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="https://sling.apache.org/jcr/sling/1.0" xmlns:jcr="https://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" email.from="name@server.com"/>
-
Replace the value of the
email.from
attribute (name@server.com
) with your email address. -
Save the file.
Configuring the Workflow Email Notification Service
When you receive workflow email notifications, both the from-email address and the host URL prefix are set to default values. You can change these values by configuring the Day CQ Workflow Email Notification Service in the Web Console. If you do so, it is recommended to persist the change in the repository.
The default configuration looks as follows in the Web Console:
Email Templates for Page Notification
Email templates for page notifications are located below:
/libs/settings/notification-templates/com.day.cq.wcm.core.page
The default English template ( en.txt
) is defined as follows:
subject=[CQ Page Event Notification]: Page Event
header=-------------------------------------------------------------------------------------\n \
Time: ${time}\n \
User: ${userFullName} (${userId})\n \
-------------------------------------------------------------------------------------\n\n
message=The following pages were affected by the event: \n \
\n \
${modifications} \n \
\n\n
footer=\n \
-------------------------------------------------------------------------------------\n \
This is an automatically generated message. Please do not reply.
Customizing Email Templates for Page Notification
To customize the English email template for page notification:
-
In CRXDE, open the file:
/libs/settings/notification-templates/com.day.cq.wcm.core.page/en.txt
-
Modify the file to your needs.
-
Save the changes.
The template needs to have the following format:
subject=<text_1>
header=<text_2>
message=<text_3>
footer=<text_4>
Where <text_x> can be a mix of static text and dynamic string variables. The following variables can be used within the email template for page notifications:
-
${time}
, the event date and time. -
${userFullName}
, the full name of the user who triggered the event. -
${userId}
, the ID of the user who triggered the event. -
${modifications}
, describes the type of the page event and the page path in the format:<page event type> => <page path>
For example:
PageModified => /content/geometrixx/en/products
Email Templates for Forum Notification
Email templates for forum notifications are located under:
/etc/notification/email/default/com.day.cq.collab.forum
The default English template ( en.txt
) is defined as follows:
subject=[CQ Forum Notification]
header=-------------------------------------------------------------------------------------\n \
Time: Time: ${time}\n \
Forum Page Path: ${forum.path}\n \
-------------------------------------------------------------------------------------\n\n
message=Page: ${host.prefix}${forum.path}.html\n
footer=\n \
-------------------------------------------------------------------------------------\n \
This is an automatically generated message. Please do not reply.
Customizing Email Templates for Forum Notification
To customize the English email template for forum notification:
-
In CRXDE, open the file:
/etc/notification/email/default/com.day.cq.collab.forum/en.txt
-
Modify the file to your needs.
-
Save the changes.
The template needs to have the following format:
subject=<text_1>
header=<text_2>
message=<text_3>
footer=<text_4>
Where <text_x>
can be a mix of static text and dynamic string variables.
The following variables can be used within the email template for forum notifications:
-
${time}
, the event date and time. -
${forum.path}
, the path to the forum page.
Email Templates for Workflow Notification
The email template for workflow notifications (English) is located at:
/libs/settings/workflow/notification/email/default/en.txt
It is defined as follows:
subject=Workflow notification: ${event.EventType}
header=-------------------------------------------------------------------------------------\n \
Time: ${event.TimeStamp}\n \
Step: ${item.node.title}\n \
User: ${participant.name} (${participant.id})\n \
Workflow: ${model.title}\n \
-------------------------------------------------------------------------------------\n\n
message=Content: ${host.prefix}${payload.path.open}\n
footer=\n \
-------------------------------------------------------------------------------------\n \
View the overview in your ${host.prefix}/aem/inbox\n \
-------------------------------------------------------------------------------------\n \
This is an automatically generated message. Please do not reply.
Customizing Email Templates for Workflow Notification
To customize the English email template for workflow event notification:
-
In CRXDE, open the file:
/libs/settings/workflow/notification/email/default/en.txt
-
Modify the file to your needs.
-
Save the changes.
The template needs to have the following format:
subject=<text_1>
header=<text_2>
message=<text_3>
footer=<text_4>
<text_x>
can be a mix of static text and dynamic string variables. Each line of an <text_x>
item needs to be ended with a backslash ( \
), except for the last instance, when the absence of the backslash indicates the end of the <text_x>
string variable.The method ${payload.path.open}
reveals the path to the payload of the workitem. For example, for a page in Sites then then payload.path.open
would be similar to /bin/wcmcommand?cmd=open&path=…
.; this is without the server name, which is why the template prepends this with ${host.prefix}
.
The following variables can be used within the email template:
-
${event.EventType}
, type of the event -
${event.TimeStamp}
, date and time of the event -
${event.User}
, the user who triggered the event -
${initiator.home}
, the initiator node path -
${initiator.name}
, the initiator name -
${initiator.email}
, email address of the initiator -
${item.id}
, the id of the work item -
${item.node.id}
, id of the node in the workflow model associated with this workitem -
${item.node.title}
, title of the work item -
${participant.email}
, email address of the participant -
${participant.name}
, name of the participant -
${participant.familyName}
, family name of the participant -
${participant.id}
, id of the participant -
${participant.language}
, the participant language -
${instance.id}
, the workflow id -
${instance.state}
, the workflow state -
${model.title}
, title of the workflow model -
${model.id}
, the id of the workflow model -
${model.version}
, the version of the workflow model -
${payload.data}
, the payload -
${payload.type}
, the payload type -
${payload.path}
, path of the payload -
${host.prefix}
, host prefix, e.g.: http://localhost:4502
Adding an Email Template for a New Language
To add a template for a new language:
-
In CRXDE, add a file
<language-code>.txt
below:/libs/settings/notification-templates/com.day.cq.wcm.core.page
: for page notifications/etc/notification/email/default/com.day.cq.collab.forum
: for forum notifications/libs/settings/workflow/notification/email/default
: for workflow notifications
-
Adapt the file to the language.
-
Save the changes.
<language-code>
used as the filename for the email template needs to be a two-letters lower-case language code that is recognized by AEM. For language codes, AEM relies on ISO-639-1.Configuring AEM Assets email notifications
When Collections in AEM Assets are shared or unshared, users can receive email notifications from AEM. To configure email notifications, follow these steps.
- Configure the email service, as described above in Configuring the Mail Service.
- Log into AEM as an administrator. Click Tools > Operations > Web Console to open Web Console Configuration.
- Edit Day CQ DAM Resource Collection Servlet. Select send email. Click Save.
Experience Manager
- Administering User Guide overview
- Sites Features
- Website Administration
- Reusing Content: Multi Site Manager and Live Copy
- Live Copy Overview Console
- Configuring Live Copy Synchronization
- Creating and Synchronizing Live Copies
- MSM Rollout Conflicts
- MSM Best Practices
- Translating Content for Multilingual Sites
- Managing Translation Projects
- Identifying Content to Translate
- Preparing Content for Translation
- Creating a Language Root Using the Classic UI
- Connecting to Microsoft Translator
- Configuring the Translation Integration Framework
- Language Copy Wizard
- Translation Enhancements
- Translation Best Practices
- Configurations and the Configuration Browser
- AEM FAQs
- Operations
- Dashboards
- Operations Dashboard
- Backup and Restore
- Data Store Garbage Collection
- Monitoring Server Resources Using the JMX Console
- Working with Logs
- Configure the Rich Text Editor
- Configure the Video component
- The Bulk Editor
- Configuring Email Notification
- Configuring RTE for Producing Accessible Sites
- The Link Checker
- Troubleshooting AEM
- Audit Log Maintenance in AEM 6
- Editor
- Managing Access to Workflows
- Using cURL with AEM
- Configuring Undo for Page Editing
- Proxy Server Tool (proxy.jar)
- Configuring for AEM Apps
- Administering Workflows
- Configuring Search Forms
- Tools Consoles
- Reporting
- Administering Workflow Instances
- Configuring Layout Container and Layout Mode
- Enabling Access to Classic UI
- Starting Workflows
- Configure the Rich Text Editor plug-ins
- Admin Consoles
- Security
- User Administration and Security
- User, Group and Access Rights Administration
- Security Checklist
- OWASP Top 10
- Running AEM in Production Ready Mode
- Identity Management
- Adobe IMS Authentication and Admin Console Support for AEM Managed Services
- Creating a Closed User Group
- Mitigating serialization issues in AEM
- User Synchronization
- Encapsulated Token Support
- Single Sign On
- How to Audit User Management Operations in AEM
- SSL By Default
- SAML 2.0 Authentication Handler
- Closed User Groups in AEM
- Granite Operations - User and Group Administration
- Enabling CRXDE Lite in AEM
- Configuring LDAP with AEM 6
- Configure the Admin Password on Installation
- Service Users in AEM
- Encryption Support for Configuration Properties
- Handling GDPR Requests for the AEM Foundation
- Content Disposition Filter
- Personalization
- eCommerce
- Integration
- Integrating with Third-Party Services
- Integrating with Salesforce
- Integrating with Adobe Target
- Integrating with Adobe Analytics
- Connecting to Adobe Analytics and Creating Frameworks
- Configuring Link Tracking for Adobe Analytics
- Mapping Component Data with Adobe Analytics Properties
- Configuring Video Tracking for Adobe Analytics
- HTTP2 Delivery of Content FAQ
- Troubleshooting your Adobe Campaign Integration
- SharePoint Connector Licenses, Copyright Notices, and Disclaimers
- SharePoint Connector
- DHTML Viewer End-of-Life FAQs
- Integrating with Adobe Campaign Classic
- Related Community Articles
- Integrating with Adobe Campaign Standard
- Flash Viewers End-of-Life Notice
- Integrating with Adobe Creative Cloud
- Integrating with Adobe Dynamic Tag Management
- Opting Into Adobe Analytics and Adobe Target
- AEM Portals and Portlets
- Integrating with Dynamic Media Classic
- Troubleshooting Integration Issues
- Integrating with BrightEdge Content Optimizer
- Best Practices for Email Templates
- Catalog Producer
- Integrating with Silverpop Engage
- Integrating with Adobe Campaign
- Integrating with ExactTarget
- Analytics with External Providers
- Integrating with the Adobe Marketing Cloud
- Manually Configuring the Integration with Adobe Target
- Prerequisites for Integrating with Adobe Target
- Adobe Classifications
- Solutions Integration
- Target Integration with Experience Fragments
- Best Practices
- Content Management