468,170 Members | 2,174 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,170 developers. It's quick & easy.

SmtpMail.Send - "Could Not Access CDO.Message Object"

I am getting a "Could Not Access CDO.Message Object" Error when I try to use
the following code to send an email via ASP.NET. When I run this on one
machine it works, on another one it doesn't. Both have VS.NET installed and
both have MS Outlook installed. What do I need done to the machine that
doesn't work? Or is something wrong with the code?

Dim email as New System.Web.Mail.Message
email.To = "me@me.com"
email.Subject = "Test Subject"
email.Body = "Test Body"
System.Web.Mail.SmtpMail.SmtpServer = "MyMailServer"
Try
System.Web.Mail.SmtpMail.Send(email)
Catch ex as Exception
lblError.Text = ex.Message
End Try

Thanks in advance!
--
Chuck Foster
Programmer Analyst
Eclipsys Corporation - St. Vincent Health System
Nov 19 '05 #1
2 2091
Chuck, first make sure that CDO is installed on the server. Second, you
need to write out the inner exceptions. This error message is a generic
message and can be caused by an invalid SmtpServer address, an invalid
or missing addressee, an invalid from address, or a lack of privileges
on the Smtp Server among others.

Jason Bentley
http://geekswithblogs.net/jbentley

Nov 19 '05 #2
Thanks! I didn't have a valid from address. Matter of fact, I forgot it!
Thanks for your help!
"Jason Bentley" <im****@gmail.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...
Chuck, first make sure that CDO is installed on the server. Second, you
need to write out the inner exceptions. This error message is a generic
message and can be caused by an invalid SmtpServer address, an invalid
or missing addressee, an invalid from address, or a lack of privileges
on the Smtp Server among others.

Jason Bentley
http://geekswithblogs.net/jbentley

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by mvsguy | last post: by
2 posts views Thread by Rajat Tandon | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.