无法连接到smpt服务器

new9mtju  于 2021-06-29  发布在  Java
关注(0)|答案(1)|浏览(848)

关闭。这个问题需要细节或清晰。它目前不接受答案。
**想改进这个问题吗?**通过编辑这个帖子来添加细节并澄清问题。

22天前关门了。
改进这个问题
无法连接smtp外部服务器。 org.springframework.mail.MailSendException: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.yandex.ru, 465; timeout -1; nested exception is: java.net.ConnectException: Connection timed out (Connection timed out). Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.yandex.ru, 465; timeout -1; nested exception is: java.net.ConnectException: Connection timed out (Connection timed out); message exception details (1) are: Failed message 1: ufw状态
本地所有工作。

xu3bshqb

xu3bshqb1#

看起来您根本无法连接到smtp服务器。
试试这个:
打开防火墙中的端口(465),因为 Connection timed out 意味着客户端无法连接到该端口上的服务器,可能是因为它被服务器或客户端的防火墙阻止了。
关闭其他安全选项(如防病毒等)。

相关问题