Sending a mail using a RichTextBox

  • Thread starter Thread starter JMG
  • Start date Start date
J

JMG

Hello,
How could I send a mail in html format with the RichTextBox control ?
I tried this but it doesn't work:

MailMessage objMail = new MailMessage ();
objMail.Body = myRichTextBox.Rtf;
objMail.BodyFormat = MailFormat.Html;

Thanks in advance.
 
* "JMG said:
How could I send a mail in html format with the RichTextBox control ?
I tried this but it doesn't work:

MailMessage objMail = new MailMessage ();
objMail.Body = myRichTextBox.Rtf;
objMail.BodyFormat = MailFormat.Html;

The RichTextBox will produce RTF code, not HTML code.

Use the DHTML Edit control instead:

Right-click the toolbox -> "Add/Remove Elements..." ->
"COM Controls" -> "DHTML Edit Control for IE5".
 
Hello Herfried ,

Thanks a lot !!!

:-)))))


Herfried K. Wagner said:
The RichTextBox will produce RTF code, not HTML code.

Use the DHTML Edit control instead:

Right-click the toolbox -> "Add/Remove Elements..." ->
"COM Controls" -> "DHTML Edit Control for IE5".
 
Back
Top