Gmail启用双因素身份验证时,发送电子邮件失败 [英] Sending email fails when two factor authentication is on for Gmail

查看:207
本文介绍了Gmail启用双因素身份验证时,发送电子邮件失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用我的Gmail帐户并在我的网络应用程序中使用 smtp.gmail.com 来测试和发送电子邮件。当我的Gmail帐户的两项身份验证功能开启时,它无法发送电子邮件,但是当我关闭Gmail帐户的双重身份验证时,Web应用程序会成功发送电子邮件。欣赏任何形式的建议。

解决方案

在您的Gmail安全设置中创建一个自定义应用程序。

  1。使用您的帐户登录到Gmail 
2.导航到https://security.google.com/settings/security/apppasswords
3.在选择应用程序中选择自定义,给它一个任意名称并按下生成
4.它会给你16个字符的标记。

使用令牌作为密码与完整的Gmail帐户相结合,并不需要双因素身份验证。

I am using my Gmail account and smtp.gmail.com inside my web application to test and send email. when two factor authentication is ON for my Gmail account, it fails to send the email, however when I turn off two factor authentication for my Gmail account, the web application sends email successfully. Appreciate any kind of advice.

解决方案

Create a custom app in you Gmail security settings.

1. Log-in into Gmail with your account
2. Navigate to https://security.google.com/settings/security/apppasswords
3. In 'select app' choose 'custom', give it an arbitrary name and press generate
4. It will give you 16 chars token.

Use the token as password in combination with your full Gmail account and two factor authentication will not be required.

这篇关于Gmail启用双因素身份验证时,发送电子邮件失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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