使用 QQ 邮箱发送邮件报错:java.net.SocketTimeoutException: Read timed out. Failed messages: javax.mail.MessagingException: Exception reading response

使用 QQ 邮箱发送邮件报错:java.net.SocketTimeoutException: Read timed out. Failed messages: javax.mail.MessagingException: Exception reading response


处理方式

将发送的端口从 465 改为 587 即可。

修改前:

props.setProperty("mail.smtp.port", 465);

修改后:

props.setProperty("mail.smtp.port", 587);
原文地址:https://www.cnblogs.com/miracle-luna/p/11409145.html