473,569 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.SmtpS erver = "MyMailServ er"
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 2397
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.c om> wrote in message
news:11******** *************@l 41g2000cwc.goog legroups.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1908
by: M D | last post by:
For the code see MS knowledge base #310273. All I did was comment out the parts for adding an attachment and put real values in for smtpServer & email addresses. For the SmtpServer I used my email providers entry point which they refered to as "smtp server for asp mail" and I'm wondering if it's the asp aspect. .NET has no documentation...
1
5446
by: Kamal | last post by:
I am trying to send mail through smtp. smtp service is running on my machine. But every time during the smtpmail.send(msg) call gives "Could not access 'CDO.Message' object." error. Could some one help me out to resolve this issue. Thanks in advance, Kamal
3
1922
by: Jibu | last post by:
Hi I am using SmtpMail class for mail sending. I could able to send mail using my mailse server to our LAN. But when I tried external addresses it showed the exception Message "Could not access 'CDO.Message' object.". Can anybody help me to solve this probelm
1
2690
by: Jens Øster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send e-mail addresses out side my company walls. When the e-mail is send on some one in my company it works perfect. I think it is a relay issue. Our...
3
9246
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send e-mail addresses out side my company walls. When the e-mail is send on some one in my company it works perfect. I think it is a relay issue. Our...
4
3962
by: Liz Patton | last post by:
Here's the exception: System.Exception: Unable to send mail: Could not access 'CDO.Message' object. ---> 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 (0x80004005):...
1
2438
by: Jason | last post by:
I am trying to send mail via SMTP, using VB.NET on XP. I keep getting this error: "Could not access 'CDO.Message' object." (I can send mail fine via VB6, using CDONTS.) I have added a reference to System.Web, and this is my code: Try WebMailMessage.From = Sender
9
1781
by: mvsguy | last post by:
I'm a Notes admin tasked with fixing an Access problem. I hope someone will be gracious enough to help. The database is getting a 3420, object not defined, and I need to find all the places where the object is referenced. In Notes, I'd just get a synopsis which shows all executable lines of code in the entire database. Does Access have...
2
3607
by: Rajat Tandon | last post by:
Hi, I have a grid which is continuously updating by the data from a external event. When I close the form on which the grid is placed, then it gives the error message ... "Can not access a disposed object". I understand that it is because as soon as the form is closed it will in turn try to dispose the grid. I have unwired the event in...
0
7694
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
7609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.