error while using SmtpMail to send a simple html formatted message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am trying to send an email using System.Web.Mail.SmtpMail. I am getting
error: "Could not accessCDO.Message object"
It was a HTML formatted message, if I try to use Text BodyFormat it sent the
mail successfully. But my need is to send a HTML formatted message.

So I tried to unregister the CDOSys.dll -- successful
then I tried to register it back and got the error - "DllRegisterServer in
cdosys.dll failed. Return code was: 0x800704da"
Now while trying to send mail using SmtpMail I am getting error: "Could not
create CDO.Message object"

Now I can't send Html or Text BodyFormat messages.

Have someone encountered this problem before?

-DotNetJunkie
 
Don't use the System.Web.Mail.SmtpMail and associated classes. They are
deprecated. Use the System.Net.Mail classes. Check out the following web
site: http://www.systemnetmail.com/

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
I can't use System.Net.Mail classes as project is on Framework 1.1. And the
problem is that same code is working on all other machines except one. Thats
why I was trying to work on the dlls of the machine.
 
BEfore trying the sample code I would like to mention that mine code is
working on all machines except one. That is the reason I am playing with
dlls.
 
You may want to be sure that CDOSYS is installed and configured properly on
the machine in question. It sounds like it is not. The nice thing about
System.Net.Mail is that there is no dependency on such as COM object in the
managed software.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
Back
Top