G
Guest
I'm trying to expand my horizons here by working through an ASP.Net book.
When I do the example that uses:
Line 55: Mail.From = "(e-mail address removed)"
Line 56: SmtpMail.SmtpServer = "localhost"
Line 57: SmtpMail.Send(Mail)
I get:
[COMException (0x8004020f): The server rejected one or more recipient
addresses. The server response was: 550 5.7.1 Unable to relay for
(e-mail address removed)
]
Since both my code and the code from the book failed, I'm assuming there's
something else I need to configure? I show SMTP running under services so
there must be something else I need to do here. The remainder of the
exception follows. Thanks
[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParameters) +473
System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
methodName, Object[] args) +58
[HttpException (0x80004005): Could not access 'CDO.Message' object.]
System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
methodName, Object[] args) +111
System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1861
System.Web.Mail.SmtpMail.Send(MailMessage message) +153
Chapter_08.SmtpEmail.Button1_Click(Object sender, EventArgs e) in
C:\Microsoft Press\ASPNETSBS\Chapter_08\SmtpEmail.aspx.vb:57
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
When I do the example that uses:
Line 55: Mail.From = "(e-mail address removed)"
Line 56: SmtpMail.SmtpServer = "localhost"
Line 57: SmtpMail.Send(Mail)
I get:
[COMException (0x8004020f): The server rejected one or more recipient
addresses. The server response was: 550 5.7.1 Unable to relay for
(e-mail address removed)
]
Since both my code and the code from the book failed, I'm assuming there's
something else I need to configure? I show SMTP running under services so
there must be something else I need to do here. The remainder of the
exception follows. Thanks
[TargetInvocationException: Exception has been thrown by the target of an
invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParameters) +473
System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
methodName, Object[] args) +58
[HttpException (0x80004005): Could not access 'CDO.Message' object.]
System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
methodName, Object[] args) +111
System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1861
System.Web.Mail.SmtpMail.Send(MailMessage message) +153
Chapter_08.SmtpEmail.Button1_Click(Object sender, EventArgs e) in
C:\Microsoft Press\ASPNETSBS\Chapter_08\SmtpEmail.aspx.vb:57
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292