Error sending mail with System.Web.Mail

2

An older application using System.Web.Mail is throwing an exception on emails coming from hr@domain.com. 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()

.net
email
exchange-server
asked on Stack Overflow Sep 29, 2008 by mcrumley • edited Sep 29, 2008 by Joseph Daigle

2 Answers

1

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

answered on Stack Overflow Sep 29, 2008 by wprl
0

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

answered on Stack Overflow Sep 29, 2008 by Mesh

User contributions licensed under CC BY-SA 3.0