java qq发送邮件

异常处理

1. javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

解决方案:mail.smtp.socketFactory.fallback设置为true

2. javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure 

解决方案:jdk导致的,jdk里面有一个jce的包,安全性机制导致的访问https会报错,官网上有替代的jar包,换掉就好了

目录 %JAVA_HOME%\jre\lib\security里的local_policy.jar,US_export_policy.jar

JDK7 http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

JDK8 http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

案例参考:http://www.cnblogs.com/lihongchen/p/4543562.html#undefined

 

posted on 2017-01-23 17:42  qinyahui  阅读(160)  评论(0编辑  收藏  举报