全局配置文件:
# JavaMailsender 郵件發(fā)送的配置
spring . mail .host-smtp.gg.com tsmtp.163. com
spring . mail .username=465008297@qq. com
spring .mail . password: xxxxxx #投權(quán)碼
spring.mail. properties . mail . smtp . auth=true
spring .mail.properties .mail . smtp. starttls .enable=true
spring.mail.properties. . mail . smtp . starttls. required=true
●若使用ee郵箱發(fā)送郵件,則需要修改為spring . mail .host-smtp.gg.com.同時(shí)
spring .mail .password改為QQ郵箱的授權(quán)碼宠页。
I
#QQ郵箱->設(shè)置->賬戶->POP3/SMTP服務(wù):開(kāi)啟服務(wù)后公獲得QQ的投權(quán)碼
出現(xiàn)認(rèn)證失敗的解決方案:因?yàn)镴DKI.8中jre\lib\security中兩個(gè)jar包替換的緣故。
將下載后的local. policy. jar和US_ export. policy. jar替換到JDK1. 8的
jre\lib\security文件夾即可寇仓。