【问题标题】:SSLHandshakeException in Mail Sending Code邮件发送代码中的 SSLHandshakeException
【发布时间】:2012-10-01 16:36:53
【问题描述】:

我正在开发用于从我的域向 gmail.com 发送电子邮件的代码

我收到了SSLHandshakeException(见下文)。
这个怎么解决??

Exception in thread "main" javax.mail.MessagingException: Could not convert socket to TLS;
  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 security email sslhandshakeexception


【解决方案1】:

您没有使用 SSL,您正在尝试以普通身份验证发送邮件,而您需要经过 SSL 身份验证的访问权限。

【讨论】:

    猜你喜欢
    • 2021-12-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-06
    • 2013-01-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多