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
comhelpquestion
6 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.
  • D Offline
    D Offline
    Den2Fly
    wrote on last edited by
    #1

    Hello buddies, I tried to develop a mail sender application who gathers message properties thru a form and then constructs a System.Web.Mail.MailMessage object: MailMessage msg = new MailMessage(); // Setting 'msg' properties... SmtpMail.SmtpServer = "mail.mydomain.com"; SmtpMail.Send(msg); but an exception of type "System.Web.HttpException" occures with the following message: "Could not access 'CDO.Message' object." What the problem can be? Thanks --- "Art happens when you least expect it."

    N K 3 Replies Last reply
    0
    • D Den2Fly

      Hello buddies, I tried to develop a mail sender application who gathers message properties thru a form and then constructs a System.Web.Mail.MailMessage object: MailMessage msg = new MailMessage(); // Setting 'msg' properties... SmtpMail.SmtpServer = "mail.mydomain.com"; SmtpMail.Send(msg); but an exception of type "System.Web.HttpException" occures with the following message: "Could not access 'CDO.Message' object." What the problem can be? Thanks --- "Art happens when you least expect it."

      N Offline
      N Offline
      NFinch
      wrote on last edited by
      #2

      mmm, yes I have had this before. It is a default message when calling the SmtpMail.Send method. Have you added any attachements to the message, if so, make sure that they are accessible! Make sure that you are specifiying a valid SMTP server. Does the SMTP server require authentication?

      D 1 Reply Last reply
      0
      • N NFinch

        mmm, yes I have had this before. It is a default message when calling the SmtpMail.Send method. Have you added any attachements to the message, if so, make sure that they are accessible! Make sure that you are specifiying a valid SMTP server. Does the SMTP server require authentication?

        D Offline
        D Offline
        Den2Fly
        wrote on last edited by
        #3

        First thank u for the reply. I haven't added any attachments. My SMTP server is valid but I don't know if it needs authentication or not, Also I can't figure out how can I send credentials to get authenticated if the server requires. Can u tell me? Also is there any free no-authentication smtp server on the net so I can test my app with? what about my WindowsXP pro virtual SMTP server how can I use that to test my app? Thank u --- "Art happens when you least expect it."

        N 1 Reply Last reply
        0
        • D Den2Fly

          Hello buddies, I tried to develop a mail sender application who gathers message properties thru a form and then constructs a System.Web.Mail.MailMessage object: MailMessage msg = new MailMessage(); // Setting 'msg' properties... SmtpMail.SmtpServer = "mail.mydomain.com"; SmtpMail.Send(msg); but an exception of type "System.Web.HttpException" occures with the following message: "Could not access 'CDO.Message' object." What the problem can be? Thanks --- "Art happens when you least expect it."

          K Offline
          K Offline
          K Ravikumar
          wrote on last edited by
          #4

          This URL may help you.. Regards K RaviKumar

          1 Reply Last reply
          0
          • D Den2Fly

            Hello buddies, I tried to develop a mail sender application who gathers message properties thru a form and then constructs a System.Web.Mail.MailMessage object: MailMessage msg = new MailMessage(); // Setting 'msg' properties... SmtpMail.SmtpServer = "mail.mydomain.com"; SmtpMail.Send(msg); but an exception of type "System.Web.HttpException" occures with the following message: "Could not access 'CDO.Message' object." What the problem can be? Thanks --- "Art happens when you least expect it."

            K Offline
            K Offline
            K Ravikumar
            wrote on last edited by
            #5

            This URL may help you.. http://www.dotnet247.com/247reference/a.aspx?u=http://www.dotnetjunkies.com/Tutorial/7D8C8892-397A-400B-AD22-188B8F4F53C9.dcik Regards K RaviKumar

            1 Reply Last reply
            0
            • D Den2Fly

              First thank u for the reply. I haven't added any attachments. My SMTP server is valid but I don't know if it needs authentication or not, Also I can't figure out how can I send credentials to get authenticated if the server requires. Can u tell me? Also is there any free no-authentication smtp server on the net so I can test my app with? what about my WindowsXP pro virtual SMTP server how can I use that to test my app? Thank u --- "Art happens when you least expect it."

              N Offline
              N Offline
              NFinch
              wrote on last edited by
              #6

              Here is some sample code for authenticating against an SMTP server. You could just set up your own Virtual SMTP server for testing purposes and not have to worry about authenticating just yet. Someone else has replied with a useful link for that already. Here is the code: System.Web.Mail.MailMessage ms = new System.Web.Mail.MailMessage(); ms.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); ms.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "myUsername"); ms.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "myPassword"); ms.To = "you@yourcompanyaaaxxx.com"; ms.From = "me@mycompanyaaaxxx.com"; ms.Subject = "test message"; ms.Body = "the body of my message"; System.Web.Mail.SmtpMail.SmtpServer = "mail.mycompanyaaaxxx.com"; System.Web.Mail.SmtpMail.Send(ms); HTH Nick

              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