Support Article
Notification emails do not arrive at assigned time
SA-68007
Summary
On assigning an Operator or a work basket in a project, a notification mail is sent.
A notification mail is sent when a case is assigned to an Operator or the work basket in a project. In some Notification emails, the Notification mail does not arrive at the assigned time. As a result, the mail is sent when the API server is restarted.
When an assignment is sent, a notification email is sent by either of the below methods which exist in the user's application:
- Use the Notify function of the assignment shape.
- Add the Execute activity in front of the Assignment shape and use SendSimpleEmail.
Error Messages
Not Applicable
Steps to Reproduce
- Set a Notify email for each assignment.
- Stop the SMTP server.
- Execute the flow (send Notify).
- Start the SMTP server after an hour.
Root Cause
Since, the SMTP server stopped, the Send Notify agent attempted multiple times to send a notification and exceeded the pyEmailMaxResend. The Notify message was marked unrecoverable. Hence, the Notify message was not sent until the Pega server was restarted.
Resolution
Perform the following local-change:
Set pyEmailMaxResend values such that they are greater than the maintenance hours (such as 1440 times).
Pega-ProcessEngine • pyEmailMaxResends
Change pega_integrationengine_default.SendEmailMessage Java code as below.
There are errors which are considered as Recoverable errors in the pega_integrationengine_default.SendEmailMessage function.
if(cause.getMessage().toLowerCase().indexOf("connection reset") >= 0) { recover = 1; } }
if(e.getMessage() != null) { msg = msg + ": " + e.getMessage();
if(msg.toLowerCase().indexOf("could not connect to smtp host") >= 0) { recover = 1; }
Since the usecase is of a nonrecoverable error, add the error in the pega_integrationengine_default.SendEmailMessage function.
For more information, refer to: https://community.pega.com/support/support-articles/change-max-number-pyemailmaxresends-does-not-reflect
Published May 10, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.