一、设置系统管理员邮箱地址:
首页-Manage Jenkins-Configure System-找到Jenkins Location

二、设置Extended E-mail Notification(邮件扩展插件)
1、首页-Manage Jenkins-Configure System-找到Extended E-mail Notification,SMTP基础设置,见下图:




特别提示
在使用QQ邮箱服务时smtp的端口只能设置为587,并且不需要勾选使用SSL协议,如果勾选就会报异常:
javax.net.ssl.SSLException:Unrecognized SSL message
开启smtp服务
第一步:
登录QQ邮箱,在设置-账户-开启“IMAP/SMTP服务,会出现以下弹框:

发送短信后,会出现授权框:

构建项目发送到邮箱的设置

特别提示
在上图smtp基础设置4里填写的密码就是授权码
2、邮件默认正文内容如下:
默认正文内容转自:https://www.cnblogs.com/wanglle/p/12899896.html
smtp端口如果设置为465,发送测试邮件时就会出错,需要改成587才可以
端口填写465会出现错误:javax.mail.MessagingException: Could not connect to SMTP host: smtp.qq.com, port: 465, response: -1,同时不能勾选“使用SSL协议”
网友评论