通过 Gmail SMTP 发送电子邮件时出错 - “请通过您的网络浏览器登录,然后重试.534-5.7.14" [英] Getting error while sending email through Gmail SMTP - "Please log in via your web browser and then try again. 534-5.7.14"

查看:79
本文介绍了通过 Gmail SMTP 发送电子邮件时出错 - “请通过您的网络浏览器登录,然后重试.534-5.7.14"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 gmail smtp 服务器时遇到问题.我已经在 StackOverflow 上阅读了很多关于该主题的帖子.

我发现的关于测试连接的最佳帖子是

我正在解决所有这些问题,因为@MediaTemple 和@DreamHost 无法与 PHPMailer 一起使用.很久以前,我已经在许多不同的主机中使用 PHPMailer,使用 SMTP,但使用 (mt) 和 Dreamhost 失败了.现在我正处于一个项目的中间,它>必须<在这两个主机上工作.

解决方案

我知道这是一个较老的问题,但我最近遇到了同样的问题并且在解决它时遇到了问题,尽管尝试了 DisplayUnlockCaptcha 修复.这就是我让它活着的方式.

转到帐户安全设置 (https://www.google.com/settings/security/lesssecureapps) 并启用访问安全性较低的应用程序",这允许您将 google smtp 用于官方客户端以外的客户端.

更新

Google 非常友好地为我们列出所有潜在问题和修复.虽然我建议尝试不太安全的应用设置.确保将这些应用到正确的帐户.

<块引用>
  • 如果您为自己的帐户启用了两步验证,则可能需要输入 应用密码 而不是您的常规密码.
  • https://mail.google.com 的网络版 Gmail 登录您的帐户.登录后,尝试登录
    再次访问邮件应用.
  • 访问 http://www.google.com/accounts/DisplayUnlockCaptcha 并使用您的 Gmail 用户名和密码.如果询问,请输入
    扭曲图片中的字母.
  • 您的应用可能不支持最新的安全标准.尝试更改一些设置以允许不太安全的应用访问您的帐户.
  • 确保您的邮件应用未设置为过于频繁地检查新电子邮件.如果您的邮件应用每 10 次检查一次以上的新邮件
    分钟后,该应用可能会被阻止访问您的帐户.

I'm having problems with gmail smtp server. I already read many posts here in StackOverflow about that subject.

The best post I found about test the connection is this one.

Although it is very well explained the error I'm getting I couldn't find a answer: Google SMTP just says "Please log in via your web browser and then try again". I'm completely sure that the password and the email (both in base64) are well encoded.

As you can see here, in this image:

,

there is just one difference I can notice: the user@gmail.com and password is sent in two steps. In the link above the guy sends both at the same time. Google didn't accepted that. But the fact is, I write auth login Y29udGF0... (user in base64, googles responds: ) 334 UGFzc3dvcmQ6 (wich means "Password: ") YzQ2MjJmNWVi.... (paste my password in base64 and hit "enter")

Then Goggle says: Please log in via your web browser and then try again. 534-5.7.14 Learn more at https://support.google.com/mail/answer/7126229

And I'm going through all this problem because @MediaTemple and @DreamHost are not working with PHPMailer. I already use PHPMailer for a long time ago, in so many different hosts, using SMTP but failed with (mt) and Dreamhost. Now I'm in middle of a project that it >must< work on these two hosts.

解决方案

I know this is an older issue, but I recently had the same problem and was having issues resolving it, despite attempting the DisplayUnlockCaptcha fix. This is how I got it alive.

Head over to Account Security Settings (https://www.google.com/settings/security/lesssecureapps) and enable "Access for less secure apps", this allows you to use the google smtp for clients other than the official ones.

Update

Google has been so kind as to list all the potential problems and fixes for us. Although I recommend trying the less secure apps setting. Be sure you are applying these to the correct account.

  • If you've turned on 2-Step Verification for your account, you might need to enter an App password instead of your regular password.
  • Sign in to your account from the web version of Gmail at https://mail.google.com. Once you’re signed in, try signing in
    to the mail app again.
  • Visit http://www.google.com/accounts/DisplayUnlockCaptcha and sign in with your Gmail username and password. If asked, enter the
    letters in the distorted picture.
  • Your app might not support the latest security standards. Try changing a few settings to allow less secure apps access to your account.
  • Make sure your mail app isn't set to check for new email too often. If your mail app checks for new messages more than once every 10
    minutes, the app’s access to your account could be blocked.

这篇关于通过 Gmail SMTP 发送电子邮件时出错 - “请通过您的网络浏览器登录,然后重试.534-5.7.14"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆