咳咳~最头疼的就是莫名其妙的错误。
本来今年6月份运行通过的代码,过俩月就报错了。
1 javax.mail.MessagingException: Could not connect to SMTP host: smtp.exmail.qq.com, port: 465;2 nested exception is:3 javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure4 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2102)5 at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:699)6 at javax.mail.Service.connect(Service.java:388)7 at javax.mail.Service.connect(Service.java:246)8 at javax.mail.Service.connect(Service.java:195)9 at javax.mail.Transport.send0(Transport.java:254)10 at javax.mail.Transport.send(Transport.java:124)11 at com.genepoint.tool.EmailUtil$2.run(EmailUtil.java:78)12 Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure13 at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)14 at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)15 at sun.security.ssl.SSLSocketI