我正在开发用于从我的域发送电子邮件到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
答案 0 :(得分:-1)
您正在尝试以普通身份验证方式发送邮件,而您需要SSL身份验证访问权限。