Could not access CDO.Message Object

  • Thread starter Thread starter Paul Glavich
  • Start date Start date
P

Paul Glavich

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
 
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
 
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.
 
Yes localhost is a valid alias for my machine. I have also
tried using "127.0.0.1", same errors. When I don't specify
the SMTP server, it takes my local machine and works fine.
But the reason I am using the smtp server is becoz I later
want to replace it with the exchange server name, which
also does not work currently. Any help is greatly
appreciated.

Thanks!
Vijay
 
Have you tried using the machine name?

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