【发布时间】:2020-05-19 07:36:33
【问题描述】:
我使用 smtp.gmail.com:465 作为coldfusion 的邮件服务器。我使用命令openssl s_client -connect smtp.gmail.com:465 获取其证书并将其导入其Java 信任库。
它可以完美运行一段时间,没有任何问题。然后在随机数周后它停止工作并给出此错误:
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
获取证书并再次导入后即可使用。
我不得不继续这样做很烦人。
任何人都知道可能导致问题的原因以及可能的解决方案吗?
【问题讨论】:
标签: java coldfusion smtp gmail