javax.mail.AuthenticationFailedException:535-5.7.8不接受用户名和密码 [英] javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted

查看:212
本文介绍了javax.mail.AuthenticationFailedException:535-5.7.8不接受用户名和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用JavaMail API发送邮件时出现此错误:

I am getting this error when I try to send mail using the JavaMail API:

javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted

我该如何解决?

推荐答案

很抱歉无法参加Party.如果您使用的是Gmail服务器,这可能是您任务中的问题.

Sorry for coming late to Party.These could be the problem in your task if you are using Gmail Server.

  1. 应关闭两步验证.
  2. 允许安全程度较低的应用(应启用).
  3. 请检查您的用户名和密码.
  4. 检查代码(这是我的问题),以上三个您可以从Google帮助中心更改表格,而您自己可以更改最后一个我可以与您分享的经验. 您需要在对邮件服务器进行身份验证之前进行通信,因为它是通过邮件进行通信的质询响应系统.
  1. Two Step Verification should be turned off.
  2. Allow Less Secure App(should be turned on).
  3. Please Check Your UserName and Password.
  4. Check the code(which was my Problem), Above three You can change form google help center and by Yourself last one My Experience I can Share with You. You need to Authenticate the Mail server before Communicating the message because it is Challenge Response System By which You are Communicating through the mail.I am sharing code snippets file you can refer not able to format my code by ctrl+K.

这篇关于javax.mail.AuthenticationFailedException:535-5.7.8不接受用户名和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆