问题
Jenkins gives following after completing test execution:
Error sending to the following INVALID addresses: valid emailid
jenkins build log:
Build step 'Execute shell' marked build as failure
Email was triggered for: Failure
Sending email for trigger: Failure
Sending email to: valid emailid
Error sending to the following INVALID addresses : valid emailid
Finished: FAILURE
回答1:
I was getting this error too, and in the build log Jenkins displayed the "invalid address" error, but listed a valid email address.
I fixed it by going to "Manage Jenkins" -> "Configure System" and set "System Admin e-mail address" under "Jenkins Location" to a valid email address (the default was something like address not set <nobody@nowhere.org>
).
I'm using the Email-ext plugin.
回答2:
I have also met this question.
I installed a plugin called Email Extension Plugin, but forgot to configure it. When I build the item, Jenkins put out that message.
Configure the jenkins > configure > Extended E-mail Notification completely, than your problem should be fixed.
回答3:
make sure that you enter the right credentials for your email plugin go to Jenkins -> Manage Jenkins -> Configure System find your email plugin settings in this list (I use Extended E-mail Notification/Email-ext plugin) and make sure that the SMTP server, user, password SMTP port and etc. is correct (press on advanced button in jenkins Configure System page, in your email plugin section)
make sure that your jenkins machine has (network) access and can send data to your smtp server
回答4:
I faced the same error .
Email was triggered for: Success
Sending email for trigger: Success
messageContentType = text/plain; charset=UTF-8
Adding recipients from trigger recipient list
Successfully created MimeMessage
Sending email to: myname@mydomain.com
Error sending to the following INVALID addresses: myname@mydomain.com
SendFailedException message: Invalid Addresses
It turned out to be my Jenkins server and my SMTP server are in two different areas of the organisation network, which do not set up to trust each other.
I had to changed the SMPT server to another one in the same area of the jenkins server and the problem got solved.
Email was triggered for: Success
Sending email for trigger: Success
messageContentType = text/plain; charset=UTF-8
Adding recipients from trigger recipient list
Successfully created MimeMessage
Sending email to: myname@mydomain.com
Finished: SUCCESS
回答5:
The issue got resolved after updating Email Extension Plugin to the latest version with latest Jenkins Build.
来源:https://stackoverflow.com/questions/21829216/jenkins-error-sending-to-the-following-invalid-addressesxxxyyy-com