【发布时间】:2018-01-27 08:36:23
【问题描述】:
我想在构建失败时发送电子邮件。我已经配置了我的系统管理员电子邮件地址:test@gmail.com 和SMTP 服务器:smtp.gmail.com。
这是我的管道中的代码:
pipeline{
agent none
stages{
stage('test'){
agent{
label 'VStest'
}
steps{
script{
//nothing
}
}
}
}
post{
always{
mail to: 'test@gmail.com',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
echo "sent"
}
}
}
我收到了错误:
com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 必须先发出 STARTTLS 命令。
有人知道为什么吗?谢谢。
【问题讨论】:
标签: email jenkins jenkins-plugins jenkins-pipeline