今天在本地测试定时任务发送邮件时,控制台报错,字母意思是身份验证有问题。在配置文件中没有指定用户名和密码,邮件服务器也没有提供相应的身份验证方法,所以要设置SMTP协议中的身份校验 `mail.smtp.auth` 设定`false` ,这时即可发送正常~
org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: failed to connect, no password specified?