【发布时间】: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