简体   繁体   English

无法从基于JavaMail的模块连接到smtp.gmail.com

[英]Unable to connect to smtp.gmail.com from JavaMail based module

This has been working for years but since a few weeks, my JavaMail based modules report an error when trying to connect smtp.gmail.com: 这已经工作了好几年了,但是几个星期以来,我的基于JavaMail的模块在尝试连接smtp.gmail.com时报告了一个错误:

The debugging output looks as follows: 调试输出如下所示:

DEBUG: setDebug: JavaMail version 1.4.7
DEBUG: getProvider() returning
javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL false
MessagingException 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:
Certificate signature validation failed

I cannot seem to understand where this problem comes from and any help on how to track this down would be most appreciated. 我似乎无法理解这个问题的根源,因此,对于如何跟踪此问题的任何帮助将不胜感激。

似乎只要将lib / security / cacerts文件替换为最新jdk中的文件版本就可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM