Day CQ Mail Service giving error: Invalid mail service configuration | Community
Skip to main content
supriya-hande
Level 4
November 29, 2023

Day CQ Mail Service giving error: Invalid mail service configuration

  • November 29, 2023
  • 4 replies
  • 1622 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

fmateen
Level 2
November 29, 2023

Hi @supriya-hande 

can you please share which version of AEM you have?

Is sending emails failing only from workflow process?

 

supriya-hande
Level 4
November 29, 2023

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. 

Jagadeesh_Prakash
Community Advisor
Community Advisor
November 29, 2023

@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/email-service.html?lang=en

 

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.

supriya-hande
Level 4
November 30, 2023

@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-mailingexception-invalid-mail-service/m-p/324035
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.

Sudheer_Sundalam
Community Advisor
Community Advisor
November 29, 2023

@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.

supriya-hande
Level 4
November 30, 2023

@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-configuration-not-working/td-p/246954

How to restart this on AEM cloud instance?

fmateen
Level 2
November 29, 2023

@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 

Share the debug log, that may will provide a clue

 

supriya-hande
Level 4
November 29, 2023

@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?