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

前端 未结 10 1443
臣服心动
臣服心动 2020-12-03 07:33

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 accept         


        
10条回答
  •  爱一瞬间的悲伤
    2020-12-03 07:54

    You probably got this error because the username and password of the from mail id is not matching. Please recheck your password and mail-id (username). It could be a typo.

    In some cases, Gmail prevents logging in through external applications or programs which are not authorised. Also login to your gmail account to check if gmail has prevented logging in to your account via your Java Mail API program.

    If nothing works, you could try some other SMTP server (like yahoo, yandex).

提交回复
热议问题