G
Guest
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 below. Once I set the BodyFormat to MailFormat.Html then I get:
HttpException (0x80004005): Could not access 'CDO.Message' object
Otherwise, everything works fine and I get my html tags in plain text. I've got it working (in plain text) with my local smtp server (as below) and two ISP's... all throw the same error as soon as I set the format to HTML. The email addresses have, of course, been edited for the post.
Any ideas?
Thanks,
Michael
<CODE>
MailMessage m = new MailMessage();
m.To = "(e-mail address removed)";
m.From = “[email protected]â€;
m.Subject = "testing";
//m.BodyFormat = MailFormat.Html;
m.Body = "this is my test email body.<br><b>this part is in bold</b>";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(m);
</CODE>
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 below. Once I set the BodyFormat to MailFormat.Html then I get:
HttpException (0x80004005): Could not access 'CDO.Message' object
Otherwise, everything works fine and I get my html tags in plain text. I've got it working (in plain text) with my local smtp server (as below) and two ISP's... all throw the same error as soon as I set the format to HTML. The email addresses have, of course, been edited for the post.
Any ideas?
Thanks,
Michael
<CODE>
MailMessage m = new MailMessage();
m.To = "(e-mail address removed)";
m.From = “[email protected]â€;
m.Subject = "testing";
//m.BodyFormat = MailFormat.Html;
m.Body = "this is my test email body.<br><b>this part is in bold</b>";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(m);
</CODE>