use*_*648 81 gmail smtp smtpclient two-factor-authentication
我正在使用我的Gmail帐户并smtp.gmail.com
在我的网络应用程序中测试和发送电子邮件.当我的Gmail帐户启用双因素身份验证时,它无法发送电子邮件,但是当我关闭我的Gmail帐户的双因素身份验证时,该网络应用程序会成功发送电子邮件.感谢任何建议.
Sto*_*mov 186
在Gmail安全设置中创建自定义应用.
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.
Run Code Online (Sandbox Code Playgroud)
将令牌作为密码与您的完整Gmail帐户结合使用,不需要双因素身份验证.
如果您来到这里是因为 Mac OSX 上的 ARQ 备份应用程序遇到困难,我发现以下设置对我有用:
SMTP hostname: smtp.gmail.com
SMTP Port: 587
Click: Enable SSL (STARTTLS)
Authentication Type: Password (SASL PLAIN)
User Name: <full Gmail email address>
Password: <Google-generated app password>
Run Code Online (Sandbox Code Playgroud)
Google 生成的应用程序密码是按照 @stoyan-dimov 在上面的答案中建议的方式生成的,使用以下 URL:
https://security.google.com/settings/security/apppasswords
选择生成“邮件”密码,并将设备设置为“自定义”(我将我的设备称为“ARQ”。)
注意:您的 Google 帐户必须启用双因素身份验证才能访问上述 URL。
归档时间: |
|
查看次数: |
28900 次 |
最近记录: |