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:
我这样做是为了让我的web应用通过gmail的SMTP发送邮件。我在当地试过,结果成功了。当我上传到服务器(在另一个国家)后,我得到了这个错误:
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 个解决方案
#1
33
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.
谷歌允许应用程序使用自己的账户,允许谷歌提供了一个简单的方法,去https://accounts.google.com/DisplayUnlockCaptcha,然后单击继续,然后10分钟,使用您的应用程序再次尝试发送电子邮件,和谷歌会记得应用程序/服务,允许应用程序访问您的帐户,只要你不改变你的密码。
cheers
干杯
#1
33
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.
谷歌允许应用程序使用自己的账户,允许谷歌提供了一个简单的方法,去https://accounts.google.com/DisplayUnlockCaptcha,然后单击继续,然后10分钟,使用您的应用程序再次尝试发送电子邮件,和谷歌会记得应用程序/服务,允许应用程序访问您的帐户,只要你不改变你的密码。
cheers
干杯