Expand my Community achievements bar.

Day CQ Mail Service giving error: Invalid mail service configuration

Avatar

Level 4

Hello Team,

 

We have implemented custom workflow step to send email notifications. When we deployed Day CQ Mail Service configs on Cloud dev instance, it worked properly. When we tested it second it failed and giving exception:
*ERROR* [JobHandler: /var/workflow/instances/server1303/2023-11-23/custom-page-activation_2:/content/hostplus-program/home/members/our-products-and-services/super/why-choose-hostplus] com.adobe.granite.workflow.core.job.JobHandler Error executing workflow step com.adobe.granite.workflow.WorkflowException: Process execution resulted in an error at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:204) [com.adobe.granite.workflow.core:2.1.104] at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:300) [com.adobe.granite.workflow.core:2.1.104] at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502) [org.apache.sling.event:4.3.8] at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:351) [org.apache.sling.event:4.3.8] at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60) [org.apache.sling.event:4.3.8] at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:287) [org.apache.sling.event:4.3.8] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: com.day.cq.mailer.MailingException: Invalid mail service configuration. at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:292) [com.day.cq.cq-mailer:5.4.22] at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:46) [com.day.cq.cq-mailer:5.4.22] at com.host

 

When I redeployed same config, it worked and again failed. When I did some research I found we need to restart "com.day.cq.cq-mailer" bundle. In cloud instance how to restart this bundle? Does anyone know the root cause of this problem? As restarting the bundle is not a ideal solution when it keeps happening.

8 Replies

Avatar

Level 3

Hi @supriya-hande 

can you please share which version of AEM you have?

Is sending emails failing only from workflow process?

 

Avatar

Level 4

Hi @fmateen 
I am using AEM Cloud version. I have also enabled advanced networking to use Day CQ Mail Service. But even if try sharing asset its failing. 
I have implemented custom workflow process step which calls java code to send mail using Day CQ Mail service. 

Avatar

Community Advisor

@supriya-hande  do you have any custom code specific to your project? or is it an OOTB Mail Service? 

 

If Its OOTB please follow below URL https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/networking/examples/e...

 

If the issue persists and you cannot identify a resolution, consider reaching out to Adobe Support. They can provide specific guidance based on the details of your environment and configuration.

Avatar

Level 4

@Jagadeesh_Prakash We have created a custom workflow process step to approve page content by Notification mail. We are using Day CQ Mail service OSGI config to send email notification. I am using same ref link you sent above. 

Mail sending works for 1st time after deployment and didnt work after that. I found a reference here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/com-day-cq-mailer-mailinge...
This issue is because of "com.day.cq.cq-mailer" bundle. I am not sure why to restart it again and again.

I have raised adobe ticket and but no is helping on that. They are saying its custom code.

Avatar

Community Advisor

@supriya-hande ,

Use Developer Console in AEM As CS portal to check the status of the CQ Mail Service when it is failing. This might give any further clue on why it's failing on the second attempt.

Avatar

Level 4

@Sudheer_Sundalam We dont have access to Developer Console in AEM As CS portal. Adobe generally block this.

@kautuk_sahni I found this community question where you replied that we need restarting ofDay Communique 5 Mailer(com.day.cq.cq-mailer) bundle : https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/day-cq-mail-service-config...

How to restart this on AEM cloud instance?

Avatar

Level 3

@supriya-hande  Can you also enable debug logs at Day CQ mail Service ? 

To enable debug logs, please browse to yourinstanceURL//system/console/configMgr

Find Day CQ Mail Service and enable Debug Log checkbox 

debugmail.jpg

Share the debug log, that may will provide a clue

 

Avatar

Level 4

@fmateen I have already enabled Debug Email checkbox and I can see aemerror logs. But I am not sure how can I get debug logs in AEM Cloud?