Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / October 2004

Tip: Looking for answers? Try searching our database.

Could not access 'CDO Message' object.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Reynolds - 25 Oct 2004 04:48 GMT
Hello,
I have created an application that issues a SQL statement, writes the
resulting rows into an Excel spreadsheet and then emails that spreadsheet as
an attachment to our customers.  I want this to run daily and completely
unattended.

This works fine in XP where I developed it, but when I move the code to our
Win2K server, it chokes with the following message.
Could not access 'CDO Message' object.

This was built with .NET 1.1 with all service paks installed.  It is in VB
and the actual snippet of code that fails is as follows:

Dim msg as new System.Web.mail.MailMessage
Dim atch as new System.Web.mail.MailAttachment("myExcel.wks")
Try
   msg.<add all the required message stuff such as: to, from, bcc, subject,
and body>
   msg.Attachments.Add(atch)

   SmtpMail.SmtpServer = "my.mailserver.mail.com"
   SmtpMail.Send(msg)
   MessageBox.Show("It works!")
Catch ex as Exception
   MessageBox.Show(ex.Message)
EndTry

I do not get the message box that it works, I only get the above mentioned
message.

I read some posts on Google and from that I gathered that sometimes the
cdosys.dll needs to be re-registered, so I found it in my System32 dir and
did a regsvr32 on it,  That indicated success, but it did not solve my
problem.

This works just fine on my XP Pro development box using exactly the same
mail server.

Help!!!

Tim Reynolds
tim@codeonellc.com
Herfried K. Wagner [MVP] - 25 Oct 2004 12:28 GMT
"Tim Reynolds" <tim@codeonellc.com> schrieb:
> This works fine in XP where I developed it, but when I move the
> code to our Win2K server, it chokes with the following message.
> Could not access 'CDO Message' object.

Did you already take a look at <URL:http://www.systemwebmail.com/>?

Signature

Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/

CT - 26 Oct 2004 10:15 GMT
Tim,

It could be due to relay permissions. Try adding the client machine with
relay permissions on the server.

Signature

Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105

> Hello,
> I have created an application that issues a SQL statement, writes the
[quoted text clipped - 41 lines]
> Tim Reynolds
> tim@codeonellc.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.