spring boot Could not connect to SMTP host: smtp.xxx.com, port: 465, response: -1

Posted _Slience_

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spring boot Could not connect to SMTP host: smtp.xxx.com, port: 465, response: -1相关的知识,希望对你有一定的参考价值。

在properties配置中加入即可

spring.mail.properties.mail.smtp.ssl.enable=true

完整的是这样的
···
#mail
spring.mail.host=smtp.126.com
spring.mail.username=XXXX@126.com
spring.mail.password=你的密码
spring.mail.protocol=smtp
spring.mail.properties.mail.smtp.port=465
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.ssl.enable=true
spring.mail.default-encoding=utf-8
···

以上是关于spring boot Could not connect to SMTP host: smtp.xxx.com, port: 465, response: -1的主要内容,如果未能解决你的问题,请参考以下文章

spring boot:JPA org.hibernate.LazyInitializationException: could not initialize proxy [XXX#1] - n(代码

spring boot配置spring-data-jpa的时候报错CannotCreateTransactionException: Could not open JPA EntityManager

mybatis+spring boot, mapper 提示Could not autowire. No beans of … type found

spring boot Could not connect to SMTP host: smtp.xxx.com, port: 465, response: -1

微服务读取不到config配置中心配置信息,Spring Boot无法找到PropertySource:找不到标签Could not locate PropertySource: label not

Spring Boot# Could not transfer artifact..maven导包问题查看和修改内置Tomcat版本自定义启动Banner