美文网首页Java
spring-boot企业邮箱配置

spring-boot企业邮箱配置

作者: ch_hanjian | 来源:发表于2019-01-21 11:13 被阅读252次

记得设置

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

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

如果都设置为ture,则会出现报错,如果是个人腾讯或者网易邮箱则需要设置成true

javax.mail.MessagingException: Could not convert socket to TLS


例子如下:

spring.mail.host=邮箱服务地址

spring.mail.username=邮箱地址

spring.mail.password=密码/授权码

spring.mail.properties.mail.smtp.auth=true

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

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

相关文章

网友评论

    本文标题:spring-boot企业邮箱配置

    本文链接:https://www.haomeiwen.com/subject/xqaqjqtx.html