views:

202

answers:

4

What I'm trying to do is provide a form where a user can type or cut and past formatted text and be able to send it as an email (similar to outlook). This is required because it's closely resembles the current work flow and these emails aren't being saved anywhere besides people's inboxes. This is obviously a bandage on a bigger problem.

My current attempt has a RichTextBox that can receive RTF that is copy and pasted but when I try to send the email, it seems that the only options are plain text and HTML. After investigating options for an RTF to HTML library, it seems that they all cost at least $300 but after reviewing how difficult it would be to write the library myself, the money and time is better spent getting a third party option. I'm curious if there is a solution to this problem (sending an email with formatted text) without bringing in a third party library.

+1  A: 

Most email clients can't display email in RTF, and that's just how it is. You can't change the email clients.

So, you need to send the email in HTML. There's no built-in WinForms control to export formatted text in HTML, unfortunately, so there's no way to accomplish this without third-party code.

mquander
A: 

You need an RTF to HTML converter. You're right, it may not be worth your time to write one. I did anyway. It wasn't too bad because I had some control over the RTF document creation and could prohibit things that I didn't want to translate to HTML. Converting RTF to HTML is basically just a document parser with the ability to replace RTF command verbs with their HTML equivalents.

Kluge
A: 

I am also looking for RTF to HTML converter. Is there any one available out there so that I could use them in my program.

A: 

I ended up finding a free solution: http://www.dreamincode.net/forums/showtopic48398.htm

It's not a perfect translation but it's better than any of the pay packages out there.

llamaoo7