By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,137 Members | 2,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,137 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.