詹金斯未能发送电子邮件

时间:2015-07-21 09:10:26

标签: email jenkins smtp port

我正在尝试使用Extended Jenkins电子邮件插件从Jenkins发送电子邮件。 这是作业的输出:

Performing post-build step
Checking if email needs to be generated
Email was triggered for: Always
Email was triggered for: Always
Sending email for trigger: Always
messageContentType = text/plain; charset=UTF-8
Adding recipients from project recipient list
Adding recipients from trigger recipient list
Setting In-Reply-To since last build was not successful
Successfully created MimeMessage
Sending email to: tomasz.szandala@nokia.com
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "webmail-apac.nsn-intra.net", port 465, isSSL false

MessagingException message: Could not connect to SMTP host: webmail-apac.nsn-intra.net, port: 465
Sending email for trigger: Always

messageContentType = text/plain; charset=UTF-8
Adding recipients from project recipient list
Adding recipients from trigger recipient list
Setting In-Reply-To since last build was not successful

不,问题:如何检查问题是什么? 我只看到: MessagingException消息:

 "Could not connect to SMTP host: webmail-apac.nsn-intra.net, port: 465"

我该如何调查原因?

1 个答案:

答案 0 :(得分:1)

我认为这是一个网络问题,您的Jenkins服务器无法通过端口465访问您的SMTP服务器。

您是否可以启动以下命令来检查端口是否已打开? (在Jenkins服务器上,jenkins帐户运行Jenkins应用程序)

telnet webmail-apac.nsn-intra.net 465

如果端口已打开,您应该看到此响应:

➜  ~  webmail-apac.nsn-intra.net 465
Trying XXX.XXX.XXX.XXX...
Connected to webmail-apac.nsn-intra.net.
Escape character is '^]'.

如果端口未打开,请尝试在Jenkins服务器上禁用防火墙。

相关问题