Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. 'Could not access CDO.Message object'

'Could not access CDO.Message object'

Scheduled Pinned Locked Moved ASP.NET
helpcomworkspace
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hasan_shan
    wrote on last edited by
    #1

    I am using the code below to send the email, but the problem is that when I am working locally (localhost) using the client smtpserver, username and password, it is working fine but when I built the project and upload files and DLL on the ftpserver. And test the project on internet it throws message 'Could not access CDO.Message object'. Can anyone help in this regard. objMailmessage.From = Request["email"]; objMailmessage.To = "asd@veri.com"; objMailmessage.Subject = "Brochure Request"; objMailmessage.Body= strMailbody; objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", smptserver); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", 2); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", username); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password); try { SmtpMail.Send(objMailmessage); } catch(System.Web.HttpException ehttp) { lblerror.Text=ehttp.Message; } Best of Luck

    V M 2 Replies Last reply
    0
    • H hasan_shan

      I am using the code below to send the email, but the problem is that when I am working locally (localhost) using the client smtpserver, username and password, it is working fine but when I built the project and upload files and DLL on the ftpserver. And test the project on internet it throws message 'Could not access CDO.Message object'. Can anyone help in this regard. objMailmessage.From = Request["email"]; objMailmessage.To = "asd@veri.com"; objMailmessage.Subject = "Brochure Request"; objMailmessage.Body= strMailbody; objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", smptserver); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", 2); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", username); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password); try { SmtpMail.Send(objMailmessage); } catch(System.Web.HttpException ehttp) { lblerror.Text=ehttp.Message; } Best of Luck

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      Check out http://www.systemwebmail.com/[^] With System.Web.Mail namespace, you should always check out the available InnerException, which would carry the exact error messages. Sometimes, only second or third level InnerException carries the exact error message. :confused: Vasudevan Deepak Kumar Personal Web: http://www.lavanyadeepak.tk/ I Blog At: http://deepak.blogdrive.com/ http://deepakvasudevan.blogspot.com/

      1 Reply Last reply
      0
      • H hasan_shan

        I am using the code below to send the email, but the problem is that when I am working locally (localhost) using the client smtpserver, username and password, it is working fine but when I built the project and upload files and DLL on the ftpserver. And test the project on internet it throws message 'Could not access CDO.Message object'. Can anyone help in this regard. objMailmessage.From = Request["email"]; objMailmessage.To = "asd@veri.com"; objMailmessage.Subject = "Brochure Request"; objMailmessage.Body= strMailbody; objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", smptserver); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", 2); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", username); objMailmessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password); try { SmtpMail.Send(objMailmessage); } catch(System.Web.HttpException ehttp) { lblerror.Text=ehttp.Message; } Best of Luck

        M Offline
        M Offline
        Mike Ellison
        wrote on last edited by
        #3

        I second the previous reply. The InnerExceptions are all-important when working with System.Web.Mail objects.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups