PC Review


Reply
Thread Tools Rate Thread

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

 
 
=?Utf-8?B?bWc=?=
Guest
Posts: n/a
 
      8th Feb 2004
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);
 
Reply With Quote
 
 
 
 
Marshal Antony
Guest
Posts: n/a
 
      8th Feb 2004
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/i...ult.asp?page=1
Hope this helps.
Regards,
Marshal Antony
..NET Developer
http://www.dotnetmarshal.com




"mg" <(E-Mail Removed)> wrote in message
news:159C054F-5B53-41F5-B8C5-(E-Mail Removed)...
> 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);



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
plain text with BodyFormat HTML not showing correctly Nagaraj Microsoft Outlook Program Addins 1 3rd Mar 2009 03:26 PM
BodyFormat as Html or Rich Text Steve*n Microsoft Outlook Program Addins 2 2nd Mar 2009 06:36 PM
Send mail using System.Web.Mail fails w/ m.BodyFormat=MailFormat.H =?Utf-8?B?Unlhbg==?= Microsoft ASP .NET 2 28th Feb 2006 01:50 AM
When MailMessage.BodyFormat = MailFormat.Html, SmtpMail.Send throws exception Aren Cambre Microsoft ASP .NET 4 5th Apr 2005 01:31 PM
issue with mailformat.html and some web sites. marc gold Microsoft C# .NET 0 11th May 2004 03:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:37 PM.