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
.