javax.mail.AuthenticationFailedException is thrown while sending email in java

I had the same problem! Google prevents access for less secure apps.

This is how I solved it:

Leave a Comment