使用 gmail 配置 Jenkins 电子邮件通知 [英] Configuring Jenkins email notification with gmail
问题描述
我尝试将 jenkins 配置为使用 gmail 作为 POP 提供商发送电子邮件通知,但我无法成功
I tried to configure jenkins to send email notification with gmail as the POP provider but I could not succeed
SMTP server - pop.gmail.com
Default user e-mail suffix - @gmail.com
Sender E-mail Address - Foobar CI <your.email@gmail.com>
Use SMTP Authentication - yes
User Name - your.email
Password - p******d
Use SSL - yes
SMTP Port - 995
Reply-To Address - noreply@gmail.com
Charset - UTF-8
测试失败:连接被拒绝
javax.mail.MessagingException:无法连接到 SMTP 主机:pop.gmail.com,端口:995;嵌套异常是:java.net.ConnectException:连接被拒绝:连接
javax.mail.MessagingException: Could not connect to SMTP host: pop.gmail.com, port: 995; nested exception is: java.net.ConnectException: Connection refused: connect
推荐答案
Google SMTP 服务器的主机名是 smtp.gmail.com,如果您使用 SSL,则正确的端口是 465.
The hostname for the Google SMTP server is smtp.gmail.com and if you use SSL, then the correct Port is 465.
POP 服务器通常只用于接收邮件,而不是发送邮件.
A POP server is usually just for receiving mails, not sending mails.
这篇关于使用 gmail 配置 Jenkins 电子邮件通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!