jira发送邮件报错

jira发送邮件的报错

1.安装完jira后,配置发送邮件出错具体报错如下:

An error has occurred with sending the test email:
com.atlassian.mail.MailException: javax.mail.MessagingException: Exception reading response;
nested exception is:
java.net.SocketTimeoutException: Read timed out
at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:)
at com.atlassian.jira.plugins.mail.webwork.SendTestMail.doExecute(SendTestMail.java:)
at webwork.action.ActionSupport.execute(ActionSupport.java:)
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:)
at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:)
at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:)
at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:)
at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:)
at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:)
.....
错误较多省略....
.....
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:)
at java.net.SocketInputStream.read(SocketInputStream.java:)
at java.net.SocketInputStream.read(SocketInputStream.java:)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:)
at java.io.BufferedInputStream.read(BufferedInputStream.java:)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:)
... more

2.排查方法

(1)网上搜索的解决办法中大部分都没有用,好多都是使用网易163邮箱做的配置,而我使用的邮箱是腾讯企业邮箱配置,测试一直发送不了,下面是第一个报错信息

AuthenticationFailedException:  Error: authentication failed

这个错误主要是我太粗心,没有配置发送的邮件密码,后面添加密码后这个错误解决。

(2)第二个报错信息

  不幸的是, 没有连接是可能的。审查以下错误并纠正:

  • SocketTimeoutException: Read timed out

这里主要是端口问题,为465,测试报错,截图如下:

jira发送邮件报错

在这里修改端口成功解决,端口号可以是25,也可以是587,就是465会报错。

上一篇:接口调用(发送http请求)


下一篇:python2与python3之间的主要区别