CDOSYS.dll and CDOEX.dll problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ayush patel
    New Member
    • Jul 2008
    • 63

    CDOSYS.dll and CDOEX.dll problem

    Hi everybody,

    I wrote a windows service and I have to do sme email functionality in it. I used SMTP and added system.web reference to the project. there are no compilation errors as such but there is a run time error saying

    System.Web.Http Exception: Could not create an object of type 'CDO.Message'. Please verify that the current platform configuration supports SMTP mail.
    at System.Web.Mail .SmtpMail.LateB oundAccessHelpe r.get_LateBound Typ()
    at System.Web.Mail .SmtpMail.CdoSy sHelper.Send(Ma ilMessage message)
    at System.Web.Mail .SmtpMail.Send( MailMessage message)
    at export.SMTP..ct or(String filename)


    i looked up and realized I need cdoex.dll or cdosys.dll in my project. i could not see both Microsoft CDO for Windows 2000 or Microsoft CDO for Exchange 2000 in the COM references list. But I do have them in my system. I tried adding them manually in the bin folder of my project. But no use.i dont know whats the problem.

    i also tried registering them using regsvr32 "\WINDOWS\Syste m32\CDOSYS.dll" and also for cdoex.dll but that is also throwing an error saying

    loadlibrary("\w indows\system32 \cdosys.dll") failed-the specified module could notbe found.


    I am using localhost as my SMTP server and it is relaying anonymous messages also. there are no authentication problems.

    does anybody know what the heck is happening. its just a simple smtp emial functionality.S ervice worked fine till friday. it also sent emails.i dont know what happened suddenly.


    please help
    Last edited by ayush patel; Jul 22 '08, 08:57 PM. Reason: spelling mistake
  • bharathreddy
    New Member
    • Aug 2006
    • 116

    #2
    hi

    I think the same problem is been discurssed :
    http://bytes.com/forum/thread203603.ht ml

    Refere this link it might help you.

    bharath vasireddy

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      Do you need to use CDO?
      Are you using VS2003? Becuase the SMTP classes moved in .NET2.0 and onward to a different location.

      Comment

      • ayush patel
        New Member
        • Jul 2008
        • 63

        #4
        Hi, thanks for replying

        I did not think i would need CDO but application throws an error saying

        System.Web.Http Exception: Could not create an object of type 'CDO.Message'. Please verify that the current platform configuration supports SMTP mail.
        at System.Web.Mail .SmtpMail.LateB oundAccessHelpe r.get _LateBoundTyp()
        at System.Web.Mail .SmtpMail.CdoSy sHelper.Send(Ma ilMes sage message)
        at System.Web.Mail .SmtpMail.Send( MailMessage message)
        at export.SMTP..ct or(String filename)

        all i thought i needed was system.web.mail but i dont know why the above error came up

        Comment

        • Curtis Rutland
          Recognized Expert Specialist
          • Apr 2008
          • 3264

          #5
          You should look into System.Net.Mail

          Very easy to send mail using SMTP, all in managed code.

          Comment

          • ayush patel
            New Member
            • Jul 2008
            • 63

            #6
            It worked I used system.net.mail . Thanks for you help.

            Comment

            • Curtis Rutland
              Recognized Expert Specialist
              • Apr 2008
              • 3264

              #7
              No problem.

              Comment

              Working...