Re: Problems sending emails
- From: "Srinivas" <no.spam@xxxxxxxxx>
- Date: Sat, 30 Apr 2005 09:23:01 +0100
Thanks a lot Alvin. I posted this message in aspnet, csharp groups also. You
are the only one to reply. Thanks once again.
I replaced the ipaddress with localhost and I recieved the following error
and inner exception.
Could not access 'CDO.Message' object.
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
System.Runtime.InteropServices.COMException (0x80040213): The transport
failed to connect 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.Type.InvokeMember(String name, BindingFlags
invokeAttr, Binder binder, Object target, Object[] args) at
System.Web.Mail.LateBoundAccessHelper.CallMethod(Type type, Object obj,
String methodName, Object[] args) at
System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
methodName, Object[] args)
Is being behind an ADSL router the cause for this error?
Regards,
Srinivas
"Alvin Bruney [MVP - ASP.NET]" <www.lulu.com/owc> wrote in message
news:ulR9WDtSFHA.3544@xxxxxxxxxxxxxxxxxxxxxxx
> replace the ipaddress with "localhost", that should fix it.
>
> --
> Regards,
> Alvin Bruney - ASP.NET MVP
>
> [Shameless Author Plug]
> The Microsoft Office Web Components Black Book with .NET
> Now available @ www.lulu.com/owc, Amazon.com etc
> "Srinivas" <no.spam@xxxxxxxxx> wrote in message
> news:uKtz$VqSFHA.2256@xxxxxxxxxxxxxxxxxxxxxxx
> > Hi,
> >
> > I am using ASP.NET SmtpMail to send email using the following code
> >
> > public void SendEmail(string From, string To, string Subject,
> > StringBuilder
> > Message, string Attachment, string mailFormat)
> > {
> > MailMessage mailMessage = new MailMessage ();
> > mailMessage.From = From;
> > mailMessage.To = To;
> > mailMessage.Subject = Subject;
> > mailMessage.Body = Message.ToString ();
> >
> > if(mailFormat == "T")
> > {
> > mailMessage.BodyFormat = MailFormat.Text;
> > }
> > else if(mailFormat == "H")
> > {
> > mailMessage.BodyFormat = MailFormat.Html;
> > }
> >
> > SmtpMail.SmtpServer = "10.0.0.1";
> > SmtpMail.Send (mailMessage);
> > }
> >
> > This code executes fine without error. But the email goes and sits in
the
> > "C:\Inetpub\mailroot\Queue" folder.
> > SMTP service is running and cdosys.dll and cdonts.dll are installed.
> >
> > My computer is connected to the internet through a Speedtouch 545 ADSL
> > router. I got the "10.0.0.1" by doing the ipconfig at command prompt.
> >
> > Can anyone please guide me in the right direction.
> >
> > Thanks,
> >
> > Srinivas
> >
> >
> >
>
>
.
- References:
- Problems sending emails
- From: Srinivas
- Re: Problems sending emails
- From: Alvin Bruney [MVP - ASP.NET]
- Problems sending emails
- Prev by Date: RE: Webservices and how to deliver different service levels?
- Previous by thread: Re: Problems sending emails
- Next by thread: Calling web Service, from one error to another "Proxy Access Denied" into "The underlying connection was closed"
- Index(es):
Relevant Pages
|
Loading