报错Could not connect to SMTP host: smtp.qq.com, port: 465, response: -1
修改applicationContext_mail.xml文件
端口号改为:587;
![在这里插入图片描述](https://img-blog.csdnimg.cn/20200521223132855.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQzOTY2MTI5,size_16,color_FFFFFF,t_70)
报错Authentication failed; nested exception is javax.mail.AuthenticationFailedException
邮箱密码是开通pop3/smtp服务时所给的授权码,而不是你注册邮箱时的真实密码
改一下密码为授权码就可以了