Getting the following error after a Jenkins upgrade to 2.380:
[Pipeline] mail
Error when executing failure post condition:
java.lang.NoSuchMethodError: ‘jenkins.plugins.mailer.tasks.MimeMessageBuilder jenkins.plugins.mailer.tasks.MimeMessageBuilder.addRecipients(java.lang.String, javax.mail.Message$RecipientType)’
…
Email notifications are no longer working.
Any advice on how to resolve it?
Anything using a Jenkinsfile fails.
mail from:“###@###.com”, to: VARIABLENAME1, replyTo: VARIABLENAME1, subject: SUBJECTVARIABLE, body: CONTENTVARIABLE
You are using two different mail methods, one emailext and the other is mail, have you tried using emailext in your Jenkinsfile? mail and emailext use different plugins.
Seems like something is wrong with the mailer plugin on your setup then. I would look in the Jenkins logs to determine if there are any exceptions from loading the plugin or similar. Also, make sure it is the latest version. You can also continue to just use the emailext step everywhere, though I would definitely look into the issue more to make sure there is not something else lurking.