我使用 Jenkins email-ext 插件在构建开始时发送电子邮件。
当我只指定此类电子邮件的一个收件人时,一切都很顺利 - 我收到了电子邮件。
但是当我指定更多收件人时,Jenkins 停止发送电子邮件,尽管在构建日志中我可以看到它们正在发送(我没有得到它们)
在构建日志中看到以下消息:“发送电子邮件至:abc@abc.com def@abc.com”。我在那里没有看到任何错误。
最佳答案
对我有用的是在电子邮件地址之间使用逗号和空格,例如:
x1@jenkins.com, x2@jenkins.com, x3@jenkins.com
Jenkins 作业的 XML 表示如下:
<maven2-moduleset plugin="maven-plugin@2.6">
...
<reporters>
<hudson.maven.reporters.MavenMailer>
<recipients>x1@jenkins.com, x2@jenkins.com, x3@jenkins.com</recipients>
<dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
<sendToIndividuals>true</sendToIndividuals>
<perModuleEmail>true</perModuleEmail>
</hudson.maven.reporters.MavenMailer>
</reporters>
</maven2-moduleset>
它一直在发送邮件,这一切都很好。
关于jenkins 不会向多个收件人发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24291167/