Exception in thread “main” org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 535 Error: authentication failed
报错的原因是,设置用户密码应该为 网易邮箱生成的 授权码,而不是邮箱账号对应的密码!
将用户密码修改为 授权码即可