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 = "fe******@graym ad.com"
Line 56: SmtpMail.SmtpSe rver = "localhost"
Line 57: SmtpMail.Send(M ail)
I get:
[COMException (0x8004020f): The server rejected one or more recipient
addresses. The server response was: 550 5.7.1 Unable to relay for
my*****@comcast .net
]
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
[TargetInvocatio nException: Exception has been thrown by the target of an
invocation.]
System.RuntimeT ype.InvokeDispM ethod(String name, BindingFlags invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters ) +0
System.RuntimeT ype.InvokeMembe r(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifi er[] modifiers,
CultureInfo culture, String[] namedParameters ) +473
System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
methodName, Object[] args) +58
[HttpException (0x80004005): Could not access 'CDO.Message' object.]
System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
methodName, Object[] args) +111
System.Web.Mail .CdoSysHelper.S end(MailMessage message) +1861
System.Web.Mail .SmtpMail.Send( MailMessage message) +153
Chapter_08.Smtp Email.Button1_C lick(Object sender, EventArgs e) in
C:\Microsoft Press\ASPNETSBS \Chapter_08\Smt pEmail.aspx.vb: 57
System.Web.UI.W ebControls.Butt on.OnClick(Even tArgs e) +108
System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring eventArgument) +57
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain() +1292