Highlighted

Cq mail queueing when smtp connection lost

Avatar

Avatar

tahir1601

Avatar

tahir1601

tahir1601

18-09-2019

Hi,

There is a requirement in our project. We are using cq mail service to send emails. Current approach is we show error message if connection to smtp server fails and mail is not sent. But now as per new requirement the email should b stored in some queue and processed when connection is restored.

Can anyone suggest how it can be done?

Replies

Highlighted

Avatar

Avatar

tahir1601

Avatar

tahir1601

tahir1601

18-09-2019

Highlighted

Avatar

Avatar

jbrar

Employee

Avatar

jbrar

Employee

jbrar
Employee

19-09-2019

As per my understanding, you can create a queue using API the Queue API at [1] and listen to Day CQ mail Service failure Topic in that queue to reprocess those events.

You can read more about this at [2]

[1] Queue (Apache Sling 7 API)

[2] Apache Sling :: Apache Sling Eventing and Job Handling

Apache Sling :: How to Manage Jobs in Sling