1. 程式人生 > >jira發送郵件報錯

jira發送郵件報錯

clas 解決辦法 buffered put image tint style ont smt

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:
225) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:162) at com.atlassian.jira.plugins.mail.webwork.SendTestMail.doExecute(SendTestMail.java:107) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:
63) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:
35) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:225) .....
錯誤較多省略....
..... Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:170) at java.net.SocketInputStream.read(SocketInputStream.java:141) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:124) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read(BufferedInputStream.java:265) at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:92) at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2349) ... 256 more

2.排查方法

(1)網上搜索的解決辦法中大部分都沒有用,好多都是使用網易163郵箱做的配置,而我使用的郵箱是騰訊企業郵箱配置,測試一直發送不了,下面是第一個報錯信息

AuthenticationFailedException: 535 Error: authentication failed

這個錯誤主要是我太粗心,沒有配置發送的郵件密碼,後面添加密碼後這個錯誤解決。

(2)第二個報錯信息

  不幸的是, 沒有連接是可能的。審查以下錯誤並糾正:

  • SocketTimeoutException: Read timed out

這裏主要是端口問題,為465,測試報錯,截圖如下:

技術分享圖片

在這裏修改端口成功解決,端口號可以是25,也可以是587,就是465會報錯。

jira發送郵件報錯