HTML Email

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

Guest

How do I send HTML email with the System.Web.Mail namespace?
I tried to put <HTML><HEAD></HEAD><BODY><b>Test</b></BODY></HTML>
in the body of the email, but it didn't work. MY html tags became text.

What can I do?
 
You need to set the
Mail.BodyFormat = MailFormat.Html

Do you know if it can handle multi-part e-mails? What I mean is ones
sent in both plain text and HTML. That way, the e-mail client being used
can display whichever it feels (or the user has specified).

Thanks.
 
Yes it does.

Alan Silver said:
Do you know if it can handle multi-part e-mails? What I mean is ones
sent in both plain text and HTML. That way, the e-mail client being used
can display whichever it feels (or the user has specified).

Thanks.
 
Yes it does.

OK, maybe I should have been a bit more specific with my question!!

*How* do you do these types of e-mails? I couldn't see anything in the
SDK - which doesn't mean it's not there, just that I couldn't find it.

TIA
 
Mail.BodyFormat = MailFormat.Html
will send both text and HTML format in the same format.
No, the documentation will not tell you everything you need to know about
email.
 
Mail.BodyFormat = MailFormat.Html
will send both text and HTML format in the same format.

Thanks. How do I set the two body texts? I would want a plain text one
and an HTML one. AFAICS, there is only the one Body property, which
presumably uses the MailFormat property to decide how to display the
contents. I can't see how you do multi-part messages.

Thanks
No, the documentation will not tell you everything you need to know about
email.
 
thanks everyone for the replies.

Alan Silver said:
Thanks. How do I set the two body texts? I would want a plain text one
and an HTML one. AFAICS, there is only the one Body property, which
presumably uses the MailFormat property to decide how to display the
contents. I can't see how you do multi-part messages.

Thanks
 
Back
Top