1、Jenkins->系统管理->系统设置;
2、可以勾选 “通过发送测试邮件配置” 测试此配置能否连通;
如果报错:Failed to send out e-mail
com.sun.mail.smtp.SMTPSendFailedException: 501 mail from address must be same as authorization user; nested exception is: com.sun.mail.smtp.SMTPSenderFailedException: 501 mail from address must be same as authorization user
则需要查看Jenkins Location的系统管理员邮件地址是否设置:
3、在对构建的job 添加邮件发送的步骤: