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

We Are Going To Discuss About javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. So lets Start this Java Article.

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

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

    This worked for me:
    Login to the gmail account you are sending mail from
    Go to Manage your Google Account -> Security -> Less secure app access -> Turn on access (not recommended)

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

    This worked for me:
    Login to the gmail account you are sending mail from
    Go to Manage your Google Account -> Security -> Less secure app access -> Turn on access (not recommended)

Solution 1

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

  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.

Original Author ThinkTank Of This Content

Solution 2

Step 1: Log into your gmail account

Step 2: Click Settings

enter image description here

Step 3: Click the Accounts and Import Tab > Other Google Account Settings

enter image description here

Step 4: Click Security

  • Scroll to the bottom of the page Under Less secure app access, click on Turn on access

enter image description here

Step 5: Set Allow less secure apps to ON

enter image description here

Original Author Vladi Of This Content

Solution 3

This worked for me:

  1. Login to the gmail account you are sending mail from
  2. Go to Manage your Google Account -> Security -> Less secure app access -> Turn on access (not recommended)

    or

    Access the URL:
    https://www.google.com/settings/security/lesssecureapps
  3. Turn “Allow less secure apps: OFF” to “Allow less secure apps: ON”

Original Author ognjenkl Of This Content

Solution 4

It works for me, you must configure your Gmail account with the below steps:

In the security section:

You need to Change “Allow less secure apps: OFF” to “Allow less secure apps: ON”

Original Author Y.LAGHOUAZI Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment