-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins Version: 2.121.3
email-ext-plugin version: 2.63
java.version: 1.8.0_144
I am seeing an intermittent issue where emails are not being sent, and there is no output in the regular log to indicate why. 3 out of our last 12 builds failed to email. When I turned on email-ext debug logging I got the following output:
[Pipeline] emailext messageContentType = text/html; charset=UTF-8 Adding recipients from project recipient list Analyzing: ******@*******.com Looking for: ******@*******.com starting at: 0 firstFoundIdx: 0 firstFoundIdx-substring: ******@*******.com => found type: 0 Analyzing: ******@*******.com Looking for: ******@*******.com starting at: 0 firstFoundIdx: 0 firstFoundIdx-substring: ******@*******.com => found type: 0 Analyzing: ******@*******.com Looking for: ******@*******.com starting at: 0 firstFoundIdx: 0 firstFoundIdx-substring: ******@*******.com => found type: 0 Adding recipients from trigger recipient list Analyzing: ***-Jenkins,<******@*******.com> Looking for: ***-Jenkins starting at: 0 firstFoundIdx: 0 firstFoundIdx-substring: ***-Jenkins,<******@*******.com> => found type: 0 Looking for: ******@*******.com starting at: 12 firstFoundIdx: 13 firstFoundIdx-substring: ******@*******.com> => found type: 0 Analyzing: ***-Jenkins,<******@*******.com> Looking for: ***-Jenkins starting at: 0 firstFoundIdx: 0 firstFoundIdx-substring: ***-Jenkins,<******@*******.com> => found type: 0 Looking for: ******@*******.com starting at: 12 firstFoundIdx: 13 firstFoundIdx-substring: ******@*******.com> => found type: 0 Successfully created MimeMessage Sending email to: ******@*******.com MessagingException message: IOException while sending message
The only difference between a successful email sent and an email failure is that last line:
MessagingException message: IOException while sending message
I noticed a similar recent issue in a different email plugin: https://issues.jenkins-ci.org/browse/JENKINS-53305
Since we cannot rely on an email notification, we had to implement a policy to closely watch builds to see if they fail.
Do you happen to run in AWS EC2? We bumped into a similar issue which was a bit difficult to trace and in the end concluded that it was most likely AWS throttling traffic to port 25 https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/