Unable to send email via google smtp on centos VPS

后端 未结 5 1721
说谎
说谎 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 10:57

    Whenever a script tries to login automatically, Gmail generally blocks the script. To enable login through script do this:

    1. Go here https://security.google.com/settings/security/activity?hl=en&pli=1
    2. In the list of signin, select the one which was blocked and contains the IP of your server.
    3. Under Unusual activity click Change and Recognize the activity as yours.

    If you do not have the activity in the list goto https://accounts.google.com/b/0/DisplayUnlockCaptcha and then try.

    Both Tricks worked for me many times.

提交回复
热议问题