SMTP Mail

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Harrison

    #1

    SMTP Mail

    Has anyone had any issues repeatedly sending SMTP e-mails from .Net?

    I have a c# component that gets executed by multiple threads, and uses
    SmtpMail.Send to send e-mails. Whilst in 80% of cases this works fine, I
    sometimes get "Could not access 'CDO.Message' object" errors

    The code in question is running as an AIC component under BizTalk.

    The call stack is:
    System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
    methodName, Object[] args)
    System.Web.Mail .CdoSysHelper.S end(MailMessage message)
    System.Web.Mail .SmtpMail.Send( MailMessage message)

    Thanks.
    Kev.


  • Randy Charles Morin

    #2
    Re: SMTP Mail

    I ran into too many similar issues myself and decided that my own Smtp
    class was in order.
    A clear reference on SMTP: the actual command-by-command conversation that sends every email, the envelope vs the headers, the ports (25/587/465), and why…


    Randy
    Learn and build with modern AI: clear explainers, hands-on tools, and guided paths, plus fast developer references. Everything runs in your browser,…


    "Kevin Harrison" <kevin.harrison @ioko.com> wrote in message news:<eZLGVy2gD HA.3272@tk2msft ngp13.phx.gbl>. ..[color=blue]
    > Has anyone had any issues repeatedly sending SMTP e-mails from .Net?
    >
    > I have a c# component that gets executed by multiple threads, and uses
    > SmtpMail.Send to send e-mails. Whilst in 80% of cases this works fine, I
    > sometimes get "Could not access 'CDO.Message' object" errors
    >
    > The code in question is running as an AIC component under BizTalk.
    >
    > The call stack is:
    > System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
    > methodName, Object[] args)
    > System.Web.Mail .CdoSysHelper.S end(MailMessage message)
    > System.Web.Mail .SmtpMail.Send( MailMessage message)
    >
    > Thanks.
    > Kev.[/color]

    Comment

    • Bill

      #3
      Re: SMTP Mail

      You could also try http://www.freesmtp.net

      "Randy Charles Morin" <rmorin@kbcafe. com> wrote in message
      news:a4d02d64.0 309251100.1bf05 92c@posting.goo gle.com...[color=blue]
      > I ran into too many similar issues myself and decided that my own Smtp
      > class was in order.
      > http://www.kbcafe.com/articles/HowTo.SMTP.CSharp.pdf
      >
      > Randy
      > http://www.kbcafe.com
      >
      > "Kevin Harrison" <kevin.harrison @ioko.com> wrote in message[/color]
      news:<eZLGVy2gD HA.3272@tk2msft ngp13.phx.gbl>. ..[color=blue][color=green]
      > > Has anyone had any issues repeatedly sending SMTP e-mails from .Net?
      > >
      > > I have a c# component that gets executed by multiple threads, and uses
      > > SmtpMail.Send to send e-mails. Whilst in 80% of cases this works fine, I
      > > sometimes get "Could not access 'CDO.Message' object" errors
      > >
      > > The code in question is running as an AIC component under BizTalk.
      > >
      > > The call stack is:
      > > System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
      > > methodName, Object[] args)
      > > System.Web.Mail .CdoSysHelper.S end(MailMessage message)
      > > System.Web.Mail .SmtpMail.Send( MailMessage message)
      > >
      > > Thanks.
      > > Kev.[/color][/color]


      Comment

      • Zane Thomas [.NET/C# MVP]

        #4
        Re: SMTP Mail

        Randy,

        Perhaps my quick scan of your article missed something. But it appears that you
        don't handle timeouts or the fact that an SMTP response line may arrive in two
        separate chunks (reads). While the former problem is obvious when it occurs the
        latter results in random protocol failures which are difficult to diagnose.


        --
        Abderaware
        Fine Components For .NET
        Turn on, tune in, download.
        zane a@t abderaware.com

        Comment

        • Kishor

          #5
          Re: SMTP Mail

          Hi,

          I also used this object to send and receive emails. I am able to send and
          receive mails successfully. But I faced one problem, which I would like to
          share with you. If you people have a better suggestions please let me know.



          I have used VB.net language to send and receive mails. Mail body format was
          HTML.



          My problem was to send and receive mail in HTML format. Which contained
          Images and text. With this I was able to send and receive the HTML text
          correctly, however I am not able to display images in the body. I tried
          attaching all the images to the messages and specifying the path. But this
          also did not worked for me. It worked only when I receive mail in the
          outlook. If I was opening this mail on web based interface I was not able to
          see images. Path which missing images was showing and the path of attachment
          was different on different server.



          I also have seen so many components, which are capable of doing this. But
          they are not free. So I would like to request you if you know the solution
          please help me.



          Regards,

          Kishor




          "Kevin Harrison" <kevin.harrison @ioko.com> wrote in message
          news:eZLGVy2gDH A.3272@tk2msftn gp13.phx.gbl...[color=blue]
          > Has anyone had any issues repeatedly sending SMTP e-mails from .Net?
          >
          > I have a c# component that gets executed by multiple threads, and uses
          > SmtpMail.Send to send e-mails. Whilst in 80% of cases this works fine, I
          > sometimes get "Could not access 'CDO.Message' object" errors
          >
          > The code in question is running as an AIC component under BizTalk.
          >
          > The call stack is:
          > System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
          > methodName, Object[] args)
          > System.Web.Mail .CdoSysHelper.S end(MailMessage message)
          > System.Web.Mail .SmtpMail.Send( MailMessage message)
          >
          > Thanks.
          > Kev.
          >
          >[/color]


          Comment

          • Kumar Gaurav Khanna [.NET MVP]

            #6
            Re: SMTP Mail

            Hi!

            Check out CSLMail at



            Regards,
            --------------------------------------------------
            Kumar Gaurav Khanna
            Microsoft MVP - .NET, MCSE Windows 2000/NT4, MCP+I
            WinToolZone - Spelunking Microsoft Technologies

            OpSupport - Spelunking Rotor


            "Kishor" <kpise@hotmail. com> wrote in message
            news:uxFYWBlhDH A.1696@TK2MSFTN GP09.phx.gbl...[color=blue]
            > Hi,
            >
            > I also used this object to send and receive emails. I am able to send and
            > receive mails successfully. But I faced one problem, which I would like to
            > share with you. If you people have a better suggestions please let me[/color]
            know.[color=blue]
            >
            >
            >
            > I have used VB.net language to send and receive mails. Mail body format[/color]
            was[color=blue]
            > HTML.
            >
            >
            >
            > My problem was to send and receive mail in HTML format. Which contained
            > Images and text. With this I was able to send and receive the HTML text
            > correctly, however I am not able to display images in the body. I tried
            > attaching all the images to the messages and specifying the path. But this
            > also did not worked for me. It worked only when I receive mail in the
            > outlook. If I was opening this mail on web based interface I was not able[/color]
            to[color=blue]
            > see images. Path which missing images was showing and the path of[/color]
            attachment[color=blue]
            > was different on different server.
            >
            >
            >
            > I also have seen so many components, which are capable of doing this. But
            > they are not free. So I would like to request you if you know the solution
            > please help me.
            >
            >
            >
            > Regards,
            >
            > Kishor
            >
            >
            >
            >
            > "Kevin Harrison" <kevin.harrison @ioko.com> wrote in message
            > news:eZLGVy2gDH A.3272@tk2msftn gp13.phx.gbl...[color=green]
            > > Has anyone had any issues repeatedly sending SMTP e-mails from .Net?
            > >
            > > I have a c# component that gets executed by multiple threads, and uses
            > > SmtpMail.Send to send e-mails. Whilst in 80% of cases this works fine, I
            > > sometimes get "Could not access 'CDO.Message' object" errors
            > >
            > > The code in question is running as an AIC component under BizTalk.
            > >
            > > The call stack is:
            > > System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
            > > methodName, Object[] args)
            > > System.Web.Mail .CdoSysHelper.S end(MailMessage message)
            > > System.Web.Mail .SmtpMail.Send( MailMessage message)
            > >
            > > Thanks.
            > > Kev.
            > >
            > >[/color]
            >
            >[/color]


            Comment

            Working...