springboot javax.mail.MessagingException: Could not connect to SMTP host

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_33212500/article/details/80681011

springboot整合邮件服务时,发送html邮件报错javax.mail.MessagingException: Could not connect to SMTP host

查资料发现是:ssl连接信息未配置导致

解决方案:

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

加上此即可

参考https://stackoverflow.com/questions/31721298/spring-boot-1-2-5-release-sending-e-mail-via-gmail-smtp


猜你喜欢

转载自blog.csdn.net/qq_33212500/article/details/80681011
今日推荐