在Springboot中使用QQ邮箱过程,访问http://localhost/email/send
出现了如下错误:Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 535 Login Fail. Please enter your authorization code to login
这个错误是登陆时出现的,一般是账号或者密码错误。再次去检查QQ邮箱的IMAP/SMTP服务的验证码,复制在下面password。再次去访问,发现消息成功发送到QQ邮箱中了。
spring:
mail:
username:
password:
host: smtp.qq.com
port: 465
default-encoding: UTF-8
properties:
mail:
smtp:
ssl:
enable: true