I am trying to send email via google SMTP.
The code is working fine in my local windows PC in tomcat. But i got this error on my centos VPS
org.apach
Even if the Gmail account credentials are correct, Google may still block authentication attempt, suspecting a robot mail sender. To fix it, make sure you are logged in using the same Gmail account in your browser, and then open the link below and step through the process of verification:
https://accounts.google.com/b/0/DisplayUnlockCaptcha
This will allow access to your Gmail account for about 10 minutes. Be sure to try your code within this time frame.
This trick helped me about half a year ago, hope nothing has been changed since then.