异常信息:Got bad greeting from SMTP host: smtp.163.com, port: 587, response: [EOF]

使用spring-boot-starter-mail

Got bad greeting from SMTP host smtp.163.com, port 587, response [EOF]_发送邮件

配置:

Got bad greeting from SMTP host smtp.163.com, port 587, response [EOF]_spring_02

解决办法1:去掉port

Got bad greeting from SMTP host smtp.163.com, port 587, response [EOF]_异常信息_03

解决办法2:添加socketFactory.class

Got bad greeting from SMTP host smtp.163.com, port 587, response [EOF]_发送邮件_04

发送邮件例子代码:

Got bad greeting from SMTP host smtp.163.com, port 587, response [EOF]_spring_05