server send emails using gmail smtp gets alerts

旧城冷巷雨未停 提交于 2019-12-20 10:05:32

问题


I did something like this to make my web app sends mails through gmail's SMTP. I tried locally and it worked. after I upload to the server (which is in another country) I get this error:

authentication failure [SMTP: Invalid response code received from server (code: 534, response: 5.7.9 Please log in with your web browser and then try again. Learn more at 5.7.9 https://support.google.com/mail/bin/answer.py?answer=78754 5.7.9 {WEBLOGINREQUIRED} fl2sm1579003pab.23 - gsmtp)]

is there a way to ignore this?


回答1:


For anyone still interest the answer:

Google have to allow your app to use your own account, to allow this google provided an easy way, just go to https://accounts.google.com/DisplayUnlockCaptcha, then click continue, then with 10 min, use your application to try to send email again, and google will remember the application/service and allow your application to access your account as long as you don't change your password.

cheers



来源:https://stackoverflow.com/questions/17462380/server-send-emails-using-gmail-smtp-gets-alerts

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!