I need to put in a customized email template to be triggered on page deactivations. I am facing a few issues - can someone please help me with the following?
1. Instead of directly modifying the email template at: /etc/notification/email/default/com.day.cq.replication/en.txt, I was wondering whether I can put the modified template in a separate folder under /etc or in /apps and have the Day CQ mail service use that email template for notifications instead of the default one - similar to overlaying for components.
2. I need a variable on the customized email template for the page title but the default template mentioned above doesn't have one. Is there any other way to include the page title in the template?
3. The default mail template has the "host.prefix" variable, but even though I have already defined the value of the variable in com.day.cq.workflow.impl.email.EMailNotificationService and also in com.day.cq.workflow.impl.email.TaskEMailNotificationService the notifications with the default template continue to come in without the "host.prefix" variable being resolved. Please refer to the screenshot below:
You can populate any variable in a email template using a Java MAP. See:
//Populate the MAP with the values submitted from the HTL front end
The Java code is explained in this article -- Adobe Experience Manager Help | Creating Adobe Experience Manager HTL Components that send Email mes...
Also - as you can see in that article - you can put the email template where you want in the JCR. You reference it via the Java code:
//Specify the EMail template
String template =
Yes, Scott is correct. You need to modify the page deactivation workflow and use custom email template as described in the below said article.
Thanks smacdonald2008 and Ratna,
Sorry, I was not aware that page deactivation also triggered a workflow. I thought it was only the Request to (un)publish and the (Un)Publish Later options that triggers a workflow. Can you give me the exact name/PID for the deactivation workflow?