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

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);
 
M

Marshal Antony

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top