我收到此错误:无法连接到 SMTP 主机:smtp.gmail.com,端口:25;

问题描述

问题是我的邮递员在测试电子邮件发送时收到以下错误

enter image description here

问题是我没有使用端口 25,这是我在 application.properties 中的代码

#Below Properties are needed for maintaining the session.
#Two Step verification should not be enabled for 
gmail.support.email=**********@gmail.com
spring.mail.host=smtp.gmail.com
spring.mail.port=465
spring.mail.protocol=smtps
spring.mail.username=*********@gmail.com
spring.mail.password=*********
spring.mail.properties.mail.transport.protocol=smtps
spring.mail.properties.mail.smtps.auth=true
spring.mail.properties.mail.smtps.starttls.enable=true
spring.mail.properties.mail.smtps.timeout=8000

来自 sts 错误的另一个标题

enter image description here

enter image description here

问题究竟出在哪里?以及怎么会产生端口 25 错误

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)