I get the following message when trying to send email from an application.
Though I have the mail.jar added for my project, it still gives me the same error. P
Follow these steps:
Google account by clicking your profile picture in the top-right cornerSign-in and Security_ tabless secure apps: OFF buttonDo all these steps, otherwise the error will persists.
-You must have to log into just one gmail account (the one you are using to send email).
-Then go to https://www.google.com/settings/security/lesssecureapps and Turn On this feature.
-And last go to https://accounts.google.com/DisplayUnlockCaptcha and click Continue.
Acoording to Security and privacy. Google may block sign-in attempts from some apps that do not use modern security standards, such as OAuth 2.0.
For javamail, the solution prevent this error is :