【问题标题】:Coldfusion stops sending emails, using smtp.gmail.com, after a while一段时间后,Coldfusion 停止使用 smtp.gmail.com 发送电子邮件
【发布时间】: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


    【解决方案1】:

    经过一番挖掘,我意识到 java 信任库 (cacert) 缺少所有根 CA 证书,包括 gmail 的根 CA。 A 找到了包括 gmail 在内的常见根 CA 证书列表并将它们导入到信任库中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-28
      • 1970-01-01
      • 2011-04-08
      • 2019-03-01
      • 2012-09-12
      • 1970-01-01
      • 2019-01-21
      相关资源
      最近更新 更多