Getting Error Transport error code was 0x80040217 while Sending Email in Asp.Net(在 Asp.Net 中发送电子邮件时出现错误传输错误代码为 0x80040217)
问题描述
我正在尝试发送电子邮件
I am trying to send Email
但我收到此错误.
无法将邮件发送到 SMTP 服务器.传输错误代码为 0x80040217.服务器响应不可用
任何有想法的人请帮助我
any one having any idea about it please Help me
推荐答案
发现当 Gmail 的安全设置不允许从您打算使用的地址发送邮件时,您也会收到此错误.我必须通过以下方式为我的帐户启用安全性较低的应用程序的访问权限:
Discovered that you can also get this error when Gmail's security settings don't allow messages to be sent from the address you intend to use. I had to enable access for less secure apps for my account in question by:
- 登录您要用于从 Excel 发送电子邮件的地址.
- 访问页面 https://www.google.com/settings/security/lesssecureapps一个>
- 点击启用不太安全的应用程序.
- 点击完成.
这篇关于在 Asp.Net 中发送电子邮件时出现错误传输错误代码为 0x80040217的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Asp.Net 中发送电子邮件时出现错误传输错误代码为 0x80040217


- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 输入按键事件处理程序 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01