Unable to send email via google smtp on centos VPS

后端 未结 5 1707
说谎
说谎 2021-01-03 10:35

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         


        
5条回答
  •  春和景丽
    2021-01-03 11:01

    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.

提交回复
热议问题