473,386 Members | 1,621 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,386 software developers and data experts.

Could not access CDO.Message Object

As you may have guessed, its sometimes generated when the
SMTP server cannot be accessed, and this is reported as
saying the class cannot be registered. I assume you dont
have an SMTP server on your local machine, and that you
are developing on y our companies intranet in which you
may have access to an SMTP server, which it is probably
discovering. Mind you, I think this error is actually
a 'cover' for a couple of other problems as well.

- Paul Glavich
-----Original Message-----
Hi all,

I am trying to send email using SMTPMail from an ASP.Net
Webform. The following is the code that I am using to sendthe emails from my localhost SMTP server. This works fine.
msg1.From = "ab*@mycompany.com"
msg1.To = "xy*@mycompany.com"
msg1.Subject = "Test"
msg1.Body = "Email Testing"
'SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(msg1)

But, when I write the same code by removing the comment onthe line that specifies the SmtpServer name as "localhost"it gives me a exception of "Could not access CDO.Message
Object". The InnerException error message is "Class not
registered". I get the same error when I replace the
localhost with an Exchange Server address like
SmtpMail.SmtpServer = "myExchSrv" or SmtpMail.SmtpServer
= "100.100.100.100" (IP of Exchange Server).

Any ideas why this is happening or what maybe wrong in mycode?

Help appreciated.
Thanks in advance!
- Vijay
.

Nov 18 '05 #1
2 1290

I do have a local SMTP as well, which works fine when I
don't mention the line
SmtpMail.SmtpServer = "localhost"
in my code, but stops working when I include this line.
Any ideas why?

Thanks!
Vijay
-----Original Message-----
As you may have guessed, its sometimes generated when the
SMTP server cannot be accessed, and this is reported as
saying the class cannot be registered. I assume you dont
have an SMTP server on your local machine, and that you
are developing on y our companies intranet in which you
may have access to an SMTP server, which it is probably
discovering. Mind you, I think this error is actually
a 'cover' for a couple of other problems as well.

- Paul Glavich
-----Original Message-----
Hi all,

I am trying to send email using SMTPMail from an ASP.Net
Webform. The following is the code that I am using to

send
the emails from my localhost SMTP server. This works

fine.

msg1.From = "ab*@mycompany.com"
msg1.To = "xy*@mycompany.com"
msg1.Subject = "Test"
msg1.Body = "Email Testing"
'SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(msg1)

But, when I write the same code by removing the comment

on
the line that specifies the SmtpServer name

as "localhost"
it gives me a exception of "Could not access CDO.Message
Object". The InnerException error message is "Class not
registered". I get the same error when I replace the
localhost with an Exchange Server address like
SmtpMail.SmtpServer = "myExchSrv" or SmtpMail.SmtpServer
= "100.100.100.100" (IP of Exchange Server).

Any ideas why this is happening or what maybe wrong in

my
code?

Help appreciated.
Thanks in advance!
- Vijay
.

.

Nov 18 '05 #2
Are you sure that "localhost" is a valid alias for your machine? Have you
tried using 127.0.0.1 instead? BTW, if you don't specify the SMTP server, it
defaults to the local machine.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Vijay" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...

I do have a local SMTP as well, which works fine when I
don't mention the line
SmtpMail.SmtpServer = "localhost"
in my code, but stops working when I include this line.
Any ideas why?

Thanks!
Vijay
-----Original Message-----
As you may have guessed, its sometimes generated when the
SMTP server cannot be accessed, and this is reported as
saying the class cannot be registered. I assume you dont
have an SMTP server on your local machine, and that you
are developing on y our companies intranet in which you
may have access to an SMTP server, which it is probably
discovering. Mind you, I think this error is actually
a 'cover' for a couple of other problems as well.

- Paul Glavich
-----Original Message-----
Hi all,

I am trying to send email using SMTPMail from an ASP.Net
Webform. The following is the code that I am using to

send
the emails from my localhost SMTP server. This works

fine.

msg1.From = "ab*@mycompany.com"
msg1.To = "xy*@mycompany.com"
msg1.Subject = "Test"
msg1.Body = "Email Testing"
'SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(msg1)

But, when I write the same code by removing the comment

on
the line that specifies the SmtpServer name

as "localhost"
it gives me a exception of "Could not access CDO.Message
Object". The InnerException error message is "Class not
registered". I get the same error when I replace the
localhost with an Exchange Server address like
SmtpMail.SmtpServer = "myExchSrv" or SmtpMail.SmtpServer
= "100.100.100.100" (IP of Exchange Server).

Any ideas why this is happening or what maybe wrong in

my
code?

Help appreciated.
Thanks in advance!
- Vijay
.

.

Nov 18 '05 #3

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

Similar topics

5
by: Tim Eliot | last post by:
Just wondering if anyone has hit the following issue and how you might have sorted it out. I am using the command: DoCmd.TransferText acExportMerge, , stDataSource, stFileName, True after...
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...
4
by: Robert | last post by:
I am trying to send an email message from the code behind page of an aspx page. Here is what I have: ======================================= Imports System.Web.Mail Private Sub EmailStuff()
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. --->...
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...
5
by: lds | last post by:
I am getting the following error: The "SendUsing" configuration value is invalid. Description: An unhandled exception occurred during the execution of the current web request. Please review the...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.