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