-
Bug
-
Resolution: Not A Defect
-
Major
-
2.18
I have tried to use env variable DEFAULT_RECIPIENTS as part of build, and not as part of global env variables
I need DEFAULT_RECIPIENTS value to be different for each job
I try to set it as part of build step
but the value is NOT available when email ext tries to send email
I get
===
Recording test results
Email was triggered for: Success
Sending email for trigger: Success
Sending email to: $team.acids
ERROR: Could not send email as a part of the post-build publishers.
com.sun.mail.smtp.SMTPSendFailedException: 250 2.6.0 <26943585.5.1337190669479.JavaMail.CAUDSWAP41$@CAUDSWAP41> Queued mail for delivery
;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 User unknownat com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1112)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)
at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:263)
at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:247)
at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:207)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656)
at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171)
at hudson.model.Run.run(Run.java:1454)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 User unknownat com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1686)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1098)
... 14 more
Notifying upstream projects of job completion
Finished: SUCCESS
DEFAULT_RECIPIENTS is not an environment variable, it is a token that is replaced. If you want to use an environment variable use the ENV token (see the Content Token Reference info in the help section of the plugin).