我试过这个教程(http://czetsuya-tech.blogspot.de/2012/11/how-to-send-email-in-glassfish-using.html)。我在Windows7Professional 64位上使用GlassFish 4.
本教程是否起作用是因为我得到了这样的例外:
javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target发布于 2014-01-20 00:11:08
您是否篡改/修改了$JAVA_HOME/jre/lib/security/cacerts文件?如果是这样,请尝试重新安装jdk。密钥存储库通常是信任证书的来源,默认情况下应该接受google的信任证书。
还要注意其他可能丢弃标准证书的JVM env。(例如:-Djavax.net.ssl.trustStore)
https://stackoverflow.com/questions/21224333
复制相似问题