1

我们希望通过 SMTP 服务器(即 Outlook 365 服务器)从我们的声纳发送违规通知。此服务器使用 TLS 来保护连接。Sonar 只为我提供 SSL 安全连接。

当我尝试启用 SSL 选项时,我得到下面列出的堆栈跟踪。

有没有办法使用声纳和使用 TLS 的 SMTP 服务器?

Caused by: javax.mail.MessagingException: Exception reading response
    at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1611) ~[na:na]
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1369) ~[na:na]
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412) ~[na:na]
    at javax.mail.Service.connect(Service.java:310) ~[na:na]
    at javax.mail.Service.connect(Service.java:169) ~[na:na]
    at javax.mail.Service.connect(Service.java:118) ~[na:na]
    at javax.mail.Transport.send0(Transport.java:188) ~[na:na]
    at javax.mail.Transport.send(Transport.java:118) ~[na:na]
    at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232) ~[na:na]
    ... 250 common frames omitted
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source) ~[na:1.6]
    at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source) ~[na:1.6]
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) ~[na:1.6]
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) ~[na:1.6]
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source) ~[na:1.6]
    at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source) ~[na:1.6]
    at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110) ~[na:na]
    at java.io.BufferedInputStream.fill(Unknown Source) ~[na:1.6.0_43]
    at java.io.BufferedInputStream.read(Unknown Source) ~[na:1.6.0_43]
    at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:88) ~[na:na]
    at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1589) ~[na:na]
    ... 258 common frames omitted
4

1 回答 1

0

为支持 TLS 而创建的票证:http: //jira.codehaus.org/browse/SONAR-4647

于 2013-09-08T16:13:31.803 回答