使用 System.Web.Mail 发送邮件时出错

发布于 2024-07-06 12:51:30 字数 1244 浏览 6 评论 0原文

使用 System.Web.Mail 的旧应用程序对来自 [电子邮件受保护]。 其他地址似乎工作正常。 当错误开始时,我们将邮件服务器更改为 Exchange 2007,所以我认为这就是问题所在。 有谁知道发生了什么事?

这是异常和堆栈跟踪:

System.Web.HttpException:无法访问“CDO.Message”对象。 ---> System.Reflection.TargetInitationException:调用目标已引发异常。 ---> System.Runtime.InteropServices.COMException (0x80040212): 传输失去了与服务器的连接。

--- 内部异常堆栈跟踪结束 ---
在 System.RuntimeType.InvokeDispMethod(字符串名称,BindingFlags invokeAttr,对象目标,对象[] args,布尔[] byrefModifiers,Int32区域性,字符串[]命名参数)
在 System.RuntimeType.InvokeMember(字符串名称、BindingFlags invokeAttr、Binder 绑定器、对象目标、Object[] args、ParameterModifier[] 修饰符、CultureInfo 区域性、String[] 命名参数)
在 System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
--- 内部异常堆栈跟踪结束 ---
在 System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
在 System.Web.Mail.CdoSysHelper.Send(MailMessage 消息)
在 System.Web.Mail.SmtpMail.Send(MailMessage 消息)
在 ProcessEmail.Main()

An older application using System.Web.Mail is throwing an exception on emails coming from [email protected]. Other addresses appear to be working correctly. We changed our mail server to Exchange 2007 when the errors started, so I assume that is where the problem is. Does anyone know what is happening?

Here is the exception and stack trace:

System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040212): The transport lost its connection to the server.

--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
--- End of inner exception stack trace ---
at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at ProcessEmail.Main()

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

江心雾 2024-07-13 12:51:30

这里有一个教程,用于诊断这些异常(一种非常常见的异常,有很多异常)的意义)。

Here's a tutorial for diagnosing those exceptions (a very common one with a lot of meanings).

一生独一 2024-07-13 12:51:30

您的客户端主机是否有权通过 Exchange 服务器发送邮件?

Does you client's host machine have permission to send mail via the Exchange Sever?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文