使用SpringBoot郵件任務發送郵箱報Couldn't connect to host, port: smtp.qq.com, 25; timeout -1錯誤
因為QQ郵箱默認端口為465

需要在yml文件配置相應的郵箱端口
1 mail: 2 port: 465 3 host: smtp.qq.com 4 username: @qq.com 5 password: 6 default-encoding: UTF-8 7 properties: 8 mail: 9 smtp: 10 auth: true 11 socketFactory: 12 port: 465 13 class: javax.net.ssl.SSLSocketFactory 14 fallback: false 15 starttls: 16 enable: true 17 required: true
