Emails having attachments sent from custom email account (ProofPoint) are sometimes stuck in a send-retry loop and actually sent many times
One symptom is when we see the following information in a node log when the email is sent:
|2020-09-07 07:46:28 (966) worker.7 worker.7 txid=f2294aaadb4f WARNING *** WARNING *** handling smtp exception: javax.mail.MessagingException: Exception reading response;|
nested exception is:
java.net.SocketTimeoutException: Read timed out : Exception reading response
2020-09-07 07:46:28 (973) worker.7 worker.7 txid=f2294aaadb4f WARNING *** WARNING *** EMAIL.b0f70ea6db4f54d09a686b4bd39619c8: send-retry
This makes the customer believe that the SN instance might not be waiting for a long enough time to receive a response from a mail server.
Release or Environment
The SMTP timeout duration is something that ServiceNow set at code level and we cannot modify it. The default SMTP timeout is 60 seconds and the default SMTP max timeout is 300.
From the ServiceNow side the step to take is to validate if there is any business rule with current.update in the target or sys_email table. The KB0715782 article that discourages the use of current.update is confirmed by the official ServiceNow documentation page that states Avoid using current.update() in a business rule script.
Here is a list of external links outside ServiceNow scope that mentions this issue: