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. General Programming
  3. C#
  4. error could not access cdo.message

error could not access cdo.message

Scheduled Pinned Locked Moved C#
helpcomsysadminlearning
2 Posts 2 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.
  • V Offline
    V Offline
    VIJAYPAPUPAGER
    wrote on last edited by
    #1

    I am a beginner & was working on namespace system.web.mail. i was simply trying to mail a hello world message on the click of a button. BUT when i tried to do it i got an error message as follows System.Web.HttpException: 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. i have not configured my outlook express is it due to that, or is there some other problem. please help me. my code was as follows private void button1_Click(object sender, System.EventArgs e) { sendemail(); } public static void sendemail() { SmtpMail.SmtpServer = "www.hotmail.com"; MailMessage mm = new MailMessage(); mm.From = "casablancaknight@hotmail.com"; mm.To = "casablanca111@hotmail.com"; mm.Body = "hello"; mm.Subject = "hi"; SmtpMail.Send(mm); }

    N 1 Reply Last reply
    0
    • V VIJAYPAPUPAGER

      I am a beginner & was working on namespace system.web.mail. i was simply trying to mail a hello world message on the click of a button. BUT when i tried to do it i got an error message as follows System.Web.HttpException: 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. i have not configured my outlook express is it due to that, or is there some other problem. please help me. my code was as follows private void button1_Click(object sender, System.EventArgs e) { sendemail(); } public static void sendemail() { SmtpMail.SmtpServer = "www.hotmail.com"; MailMessage mm = new MailMessage(); mm.From = "casablancaknight@hotmail.com"; mm.To = "casablanca111@hotmail.com"; mm.Body = "hello"; mm.Subject = "hi"; SmtpMail.Send(mm); }

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      You specified a web page as the SmtpServer. You need to provide the address to the SMTP server. - Nick Parker
      My Blog | My Articles

      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