Re: Problems sending emails



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
> >
> >
> >
>
>


.



Relevant Pages

  • Re: [SPS2003] Alerts not sent by Email to users
    ... En-têtes de messagerie:: X-AlertTitle = ... Object target, Objectargs, BooleanbyrefModifiers, Int32 culture, ... ParameterModifiermodifiers, CultureInfo culture, String[] ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Read Exchange Emails
    ... not be sent to the SMTP server. ... The transport error code was 0x800ccc15. ... CultureInfo culture, String[] namedParameters) ... String methodName, Objectargs) ...
    (microsoft.public.win32.programmer.messaging)
  • RE: "SendUsing" configuration value is invalid.
    ... Private Sub Page_Init(ByVal sender As System.Object, ... Int32 culture, String[] namedParameters) +0 ... Binder binder, Object target, Objectargs) +29 ...
    (microsoft.public.dotnet.framework.aspnet)
  • "SendUsing" configuration value is invalid.
    ... Private Sub Page_Init(ByVal sender As System.Object, ... Int32 culture, String[] namedParameters) +0 ... Binder binder, Object target, Objectargs) +29 ...
    (microsoft.public.dotnet.framework.aspnet)
  • When MailMessage.BodyFormat = MailFormat.Html, SmtpMail.Send throws exception
    ... invokeAttr, Object target, Objectargs, BooleanbyrefModifiers, ... ParameterModifiermodifiers, CultureInfo culture, String[] ... Binder binder, Object target, Objectargs) ...
    (microsoft.public.dotnet.framework.aspnet)

Loading