【发布时间】:2017-02-26 09:00:21
【问题描述】:
我正在尝试在 TeamCity 服务器中配置电子邮件通知。
这是我尝试过的 2 个配置,以及当我按下其下方的 Test connection 按钮时收到的相应错误:
配置 1
SMTP host: smtp.gmail.com
SMTP port: 465
Send email messages from: foobar@gmail.com
SMTP login: foobar@gmail.com
SMTP password: •••••••••
Secure connection: SSL
错误:
javax.mail.MessagingException:无法连接到 SMTP 主机: smtp.gmail.com,端口:465;嵌套异常是: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:PKIX 路径构建失败: sun.security.provider.certpath.SunCertPathBuilderException:无法 找到请求目标的有效认证路径
配置 2
SMTP host: smtp.gmail.com
SMTP port: 587
Send email messages from: foobar@gmail.com
SMTP login: foobar@gmail.com
SMTP password: •••••••••
Secure connection: StartTSL
错误:
javax.mail.MessagingException:无法将套接字转换为 TLS;
嵌套异常是:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:PKIX 路径构建失败: sun.security.provider.certpath.SunCertPathBuilderException:无法 找到请求目标的有效认证路径
这里出了什么问题?
【问题讨论】: