早上好
我有jenkins,正在使用gmail acc发送通知。直到大约2周前,它一直有效。
在管道中,我使用:
step([$class: 'Mailer',
notifyEveryUnstableBuild: true,
recipients: "someone@xx.com",
sendToIndividuals: true
])
Jenkins设置正确,电子邮件通知和扩展电子邮件通知的配置方式相同。允许在gmail设置中允许安全性较低的应用。
当我发送测试电子邮件时,它可以工作。当我通过管道或自由式作业使用它时,它将失败:
ERROR: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError 26sm2297642wmf.20 - gsmtp
com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1 https://support.google.com/mail/?p=WantAuthError 26sm2297642wmf.20 - gsmtp
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1580)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1097)
at javax.mail.Transport.send0(Transport.java:195)
at javax.mail.Transport.send(Transport.java:124)
at hudson.tasks.MailSender.run(MailSender.java:130)
at hudson.tasks.Mailer.perform(Mailer.java:175)
at hudson.tasks.Mailer.perform(Mailer.java:138)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1843)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
我确实遵循了Google建议的所有故障排除步骤,但“应用专用密码”除外,因为我无法将其与正在使用的电子邮件地址完全配合使用。请问有人可以向我指出正确的解决方法吗?
谢谢。
答案 0 :(得分:0)
我将mailer插件从1.27降级到1.23,建议它解决不同的问题(完全相反,测试邮件无法通过,但可以在工作中使用),并且可以解决问题。