473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Could not access 'CDO Message' object.

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
ti*@codeonellc.com
Nov 21 '05 #1
2 1181
"Tim Reynolds" <ti*@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/>?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
CT
Tim,

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

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Tim Reynolds" <ti*@codeonellc.com> wrote in message
news:Ov**************@TK2MSFTNGP10.phx.gbl...
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
ti*@codeonellc.com

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thys Brits | last post by:
Hi, I'm using the System.Web.Mail class to send an e-mail from my ASP.Net application, but when sending the e-mail, I'm getting the above error. It seems to be because I have Office XP...
2
by: Janna Deegan | last post by:
Hello all, First off, if there is a better place to post for an answer to this question, please feel free to point me there. I have some very strange behavior happening with my System.web.mail...
2
by: Desmond | last post by:
Hi, I would really appreciate if somebody could give some advise on this. I've a ASP.NET application that is supposed to send emails and it is tested to be working well on IIS 5.0 and tested...
1
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...
3
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...
1
by: Michael | last post by:
Hello, I've read a lot of threads on this subject, but they typically go back to a problem with the smtp server configuration. In my case, everything works great until I uncomment the one line...
4
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. --->...
2
by: MattB | last post by:
I've taken some working code from a vb clas library that was a part of a web application and put it into a stand alone class library so I can reuse it from other applications. I'm using some code...
3
by: pmud | last post by:
Hi, I have ab ASP.Net Application in which I need to send e-mail on button click. Even though my C# code for that is correct.I am getting the following error:: I think the following error can be...
3
by: Anthony Fine | last post by:
Hello All, I have a VB.Net app that needs to send mail. I have created a class for building my e-mail, but keep getting the error (Could not access 'CDO.Message' object.) when trying to send...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.