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".
 

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

Back
Top