Expand my Community achievements bar.

issue with com.day.cq.mailer.DefaultMailService config

Avatar

Level 3

We wanted to overwrite com.day.cq.mailer.DefaultMailService attributes and added and deployed this as run mode configuration xml but as soon as we add this configuration under /apps/custom-path, workflow email stopped triggering and when we delete it from custom-path, it start working again.

here is what we have in com.day.cq.mailer.DefaultMailService.xml

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
   jcr:primaryType="sling:OsgiConfig"

   smtp.password="eadmin"
   debug.email="{Boolean}true"
   smtp.user="eadmin"
   smtp.port="{Long}25"
   smtp.ssl="{Boolean}false"
   from.address="dev@example.com"
   smtp.host="xx.xxx.xx.xx"
/>

Also noticed, DefaultMailService OSGI conguration from system console screen is loading value from our custom path but as soon as we update it or click save , it is converting DefaultMailService node type to nt:file from sling:OsgiConfig where all the attributes are stored under jcr:data node value of binary data type.

Anything wrong with xml or how we can make it work?

3 Replies

Avatar

Level 10

See this Support KB - Configuring participant e-mail notification.

Another way to get email working in a workflow - you can use MailServiceGateway and a custom step - as discussed here: Adobe Experience Manager Help | Creating custom AEM workflow steps that send email messages

Avatar

Level 3

I think I am following Configuring participant e-mail notification .In the mean time, I removed DefaultMailService from custom path and tried to update from address from OSGI console (which is now coming from OOB config under /system/config) but it does not generate any workflow email if I update from address to anything which is not in  adobecqms domain.

For example: Email will trigger for from address= "noreply-dev@adobecqms.com" but will not trigger for "noreply-dev@xyz.com".  it was very strange and looks like bug or some kind of cross validation happening behind the scene.