System.Web.Mail.SmtpMail.Send throws Could not access 'CDO.Message' object.

Discussion in 'ASP .Net' started by DotNetGruven, Apr 21, 2004.

  1. DotNetGruven

    DotNetGruven Guest

    System.Web.Mail.SmtpMail.SmtpServer = "10.50.7.160";

    System.Web.Mail.SmtpMail.Send(mailMessage.From, mailMessage.To,
    mailMessage.Subject, mailMessage.Body);


    What could cause this exception to be thrown in code behind on an XP Pro
    development machine?

    - Do I need to install CDONTS? Something else??
    - Is there some configuration some where??

    TIA,
    geo
     
    DotNetGruven, Apr 21, 2004
    #1
    1. Advertising

  2. Hi Geo,

    From your description, you encountered "Could not access 'CDO.Message'
    object" error when using System.Web.Mail smtp component to send mail?

    Based on my experience, such problem is likely caused by the SmtpServer is
    not accessable. I Would you have a further check to see whether the
    smtpserver you set is avaliable? Also, you can try accessing it via its
    server name instead. Or is possible try testing using another smtp server
    which is guarantee to work.

    In addition, here is a weblink to the System.Web.Mail's FAQ sites which
    contains many helpful faqs.
    #Frequently Asked Questions for System.Web.Mail
    http://www.systemwebmail.com/

    Hope also helpful. Thanks.


    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
     
    Steven Cheng[MSFT], Apr 22, 2004
    #2
    1. Advertising

  3. System.Web.Mail.SmtpMail.Send uses CDOSYS not CDONTS so you don't need to install it. You normally get that error if there is a problem with your EmailTo or EmailFrom fields such as

    1) Email address is malforme
    2) Your smtp server is rejecting the email addresses because of domain security issue

    S

    1) Make sure your email address is well forme
    2) Make sure your smtp server can accept emails from specified domain

    Cheers,

    Mark.
     
    =?Utf-8?B?TWFyayBSb2RzZXRo?=, Apr 22, 2004
    #3
  4. Hi Geo,

    Have you had a chance to check out the suggestions in my last reply or have
    you got any further ideas on this issue? If you have anything unclear or if
    there're anything else we can help, please feel free to post here. Thanks.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)

    Get Preview at ASP.NET whidbey
    http://msdn.microsoft.com/asp.net/whidbey/default.aspx
     
    Steven Cheng[MSFT], Apr 27, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jibu
    Replies:
    3
    Views:
    526
    Jurjen de Groot
    Aug 26, 2003
  2. =?Utf-8?B?SmVucyDDmHN0ZXI=?=

    SmtpMail.Send - Exception "Could not access 'CDO.Message' object"

    =?Utf-8?B?SmVucyDDmHN0ZXI=?=, Jul 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    596
    Hans Kesting
    Jul 7, 2004
  3. =?Utf-8?B?SmVucw==?=
    Replies:
    3
    Views:
    7,281
    =?Utf-8?B?SmVucw==?=
    Aug 13, 2004
  4. chuckdfoster
    Replies:
    2
    Views:
    518
    chuckdfoster
    Mar 23, 2005
  5. Adam Knight
    Replies:
    1
    Views:
    1,139
    Ken Cox - Microsoft MVP
    Dec 5, 2005
Loading...

Share This Page