Combining message.BodyFormat = MailFormat.Html & message.BodyFormat = MailFormat.Text

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

Guest

I'd like to send a single e-mail message message that uses the escape character \n as well as the html tag <i> in the body

How can I combine the two parts of this merssage

message.BodyFormat = MailFormat.Text
String msgTextA = "\n\nFrom: Carol Johnson\n\nSent: Monday, February 9, 2004

message.BodyFormat = MailFormat.Html
String msgTextB = "<i> Inventory Control <i>

????? message.Body = msgText; ??????

SmtpMail.Send(message);
 
Hi,
The System.Web.Mail part does not support sending more than one body
format for an email message.
You can use either MailFormat.Text or MailFormat.Html.
I think in your case if you just want to have line breaks,you can use
MailFormat.Html for your whole email body.
message.BodyFormat = MailFormat.Html;
String msgTextA = "<br><br>From: Carol Johnson<br><br>Sent: Monday,
February 9, 2004" ;// to convert to html way

Unfortunately the System.Web.Mail class does not allow you
to send an HTML message with support for non
HTML readers.
If you really want to support non HTML readers you will
need to look for some third party.
Here is a link :
http://www.quiksoft.com/newsletter/issue002/default.asp?page=1
Hope this helps.
Regards,
Marshal Antony
..NET Developer
http://www.dotnetmarshal.com
 
Back
Top