我正在尝试使用springboot-application中的外部smtp服务器(由JHipster搭建)。我在我的applocation.yml中设置了folling,它除了SSH设置之外还接收了所有内容。
host: send.one.com
port: 465
username: user@name
password: password
protocol: smtp
tls: true
auth: true
from: user@name
当我运行应用程序时,我可以在我的日志中看到以下内容
[DEBUG] com.sun.mail.smtp - useEhlo true, useAuth true
[DEBUG] com.sun.mail.smtp - trying to connect to host "send.one.com", port 465, isSSL false
[DEBUG] com.sun.mail.smtp - EOF: [EOF]
[DEBUG] com.sun.mail.smtp - could not connect to host "send.one.com", port: 465, response: -1
似乎应用程序正在尝试连接而没有ssl,并且它将无法连接。我做错了什么?
答案 0 :(得分:0)
您尝试通过TLS发送。通常,TLS使用的标准端口是587而不是465,用于SSL。尝试它是否适用于该端口?