org.springframework.mail.MailAuthenticationException: Authentication failed
来源:互联网 发布:淘宝店铺售假48分重开 编辑:程序博客网 时间:2024/05/22 17:06
用Spring发送邮件的出现这个错误,代码如下:
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();mailSender.setHost(properties.getProperty("HOST.SERVER_"));mailSender.setUsername(properties.getProperty("USERNAME_"));mailSender.setPassword(properties.getProperty("PASSWORD_"));SimpleMailMessage smm = new SimpleMailMessage();smm.setFrom(mailSender.getUsername());smm.setTo(email);
邮箱用的是163的邮箱
USERNAME_=XXX@163.comPASSWORD_=XXXHOST.SERVER_=smtp.163.com
报这个错是因为验证错误,是163邮箱没有开启smtp服务,并获取客户端授权码,再用授权码作为password登录即可。
阅读全文
0 0
- org.springframework.mail.MailAuthenticationException: Authentication failed
- spring发送邮件时遇到错误org.springframework.mail.MailAuthenticationException: Authentication failed;
- 解决org.springframework.mail.MailAuthenticationException
- java mail 的authentication failed
- javax.mail.AuthenticationFailedException: 535 authentication failed
- javax.mail.AuthenticationFailedException: 535 Error: authentication failed
- javax.mail.AuthenticationFailedException: 535 Error: authentication failed
- javax.mail.AuthenticationFailedException: 535 Error: authentication failed
- javax.mail.AuthenticationFailedException: 535 Error: authentication failed
- java mail: javax.mail.AuthenticationFailedException: 535 authentication failed
- org.springframework.mail.MailPreparationException: mail.user isn't set
- javax.mail.AuthenticationFailedException: 535 Error: authentication failed的解决办法
- java.lang.ClassNotFoundException: org.springframework.mail.javamail.JavaMailSenderImpl
- org.apache.shiro.authc.AuthenticationException: Authentication failed for token submission
- ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
- 异常:Context initialization failed org.springframework.beans.factory.xml.XmlBeanDefinitionStoreExcept
- [ERROR] org.springframework.web.context.ContextLoader Context initialization failed
- [ERROR] org.springframework.web.context.ContextLoader Context initialization failed
- C语言结构体使用总结
- 查看是否包含字符串
- 网络覆盖OJ
- Java跨平台的构思分析
- 请求重定向和服务器内部跳转的区别
- org.springframework.mail.MailAuthenticationException: Authentication failed
- Docker入门六部曲——服务
- synchronized 与 Lock 的那点事
- [ SpringMVC ] 往后台传集合(json)参数并在Controller层获取
- Linux shell 经验手册__002__经典代码片段
- 页面实现图片滚动效果
- 【C++】Lambda表达式
- 【学习笔记】设备,驱动,总线
- TCP快速重传为什么是三次冗余ack,这个三次是怎么定下来的?