spring boot 发邮件

报错:  Mail server connection failed; nested exception is javax.mail.MessagingException: Could not convert socket to TLS;

解决方法:

配置企业邮箱

spring.mail.host=outlook
spring.mail.username=
spring.mail.password=
spring.mail.port=
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=false
spring.mail.properties.mail.smtp.starttls.required=false

spring.mail.properties.mail.smtp.starttls.enable=false
spring.mail.properties.mail.smtp.starttls.required=false

相关链接:  https://www.cnblogs.com/muliu/p/6017622.html   

    https://www.cnblogs.com/yucongblog/p/7385434.html

原文地址:https://www.cnblogs.com/Steven5007/p/9932028.html