【问题标题】:Unable to convert connection to SSL when sending e-mail jhipster发送电子邮件 jhipster 时无法将连接转换为 SSL
【发布时间】:2017-04-04 10:02:57
【问题描述】:

我想注册后发邮件通知,我都是按照jhipster关于配置邮件的文档做的:

mail:
    host: smtp.gmail.com
    port: 587
    username: *******@gmail.com
    password: *****
    protocol: smtp
    tls: true
    properties.mail.smtp:
        auth: true
        starttls.enable: true
        ssl.trust: smtp.gmail.com

根据 stackoverflow 上的另一个问题,我允许 google 帐户连接不太安全的应用程序,但我仍然遇到以下异常:

org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Unable to convert connection to SSL (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). Failed messages: javax.mail.MessagingException: Unable to convert connection to SSL (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)

我应该怎么做才能解决这个问题?

提前谢谢你。

【问题讨论】:

    标签: email gmail gmail-api jhipster


    【解决方案1】:

    也许您是从没有 SSL 证书的服务器发送电子邮件?

    【讨论】:

    猜你喜欢
    • 2014-11-07
    • 2012-11-11
    • 2017-03-13
    • 1970-01-01
    • 2012-09-26
    • 1970-01-01
    • 1970-01-01
    • 2013-11-28
    • 2010-12-31
    相关资源
    最近更新 更多