JavaMail with Gmail: 535-5.7.1 Username and Password not accepted

I had same issue :
I refer this link, I have followed below steps it worked for me.

By default Gmail account is highly secured. When we use gmail smtp from non gmail tool, email is blocked. To test in our local environment, make your gmail account less secure as

  1. Login to Gmail.
  2. Access the URL as https://www.google.com/settings/security/lesssecureapps
  3. Select “Turn on”

Leave a Comment