首页 文章

用于Gmail的SMTP配置?

提问于
浏览
3

我正在尝试在TeamCity服务器中配置电子邮件通知 .

我阅读了thisthis文档,并尝试设置配置

这是我尝试过的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,port: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:无法找到请求目标的有效证书路径

这里出了什么问题?

2 回答

  • 2

    我遇到了同样的问题,在我的情况下,禁用AVAST足以解决问题 .

    https://stackoverflow.com/a/27389691/1259763

    希望能帮助到你!

  • 3

    我禁用了防病毒,它工作了:)

相关问题