title: RTF message bodies in EML files
body: <p>We use the <a href="http://www.lumisoft.ee/lswww/download/downloads/Net/Help/html/4b7385dc-adc3-ca0f-0736-bbd5d5bdc8fe.htm" rel="nofollow noreferrer">LumiSoft.NET MIME library</a> to create EML files. These EML files are constructed by database values. The body of the email can be plain text, RTF, or HTML. We know when the body is HTML so, when that occurs, our EML file's content-type is set with this line: </p>
  
  <pre><code>Content-Type: text/html; charset="utf-8"
  </code></pre>
  
  <p>When the body is plain text or RTF (because we don't know which it is), we set the content-type to RTF like so</p>
  
  <pre><code>Content-Type: text/rtf; charset="utf-8".
  </code></pre>
  
  <p>The HTML EML files show up just fine across different products... but the RTF EML files seem to be interpreted differently by different products. This worked for years and our resulting EML files were QA'd against Outlook Express and they appeared normally. But recently we had some customers report issues with these emails showing up with the message bodies as attachments. In Outlook 2007 SP2 and Outlook 2010, the email bodies do indeed show up as TXT files that are attached to the email... and the bodies inside the email itself are empty. Furthermore, we use a product called dtSearch and when it converts these EML files to HTML, it does a similar translation where the body of the EML file is shown in the content of an attachment named Attachment0.DAT. Futhermore, we also process these EML files through Outlook Redemption and, just like Outlook 2010, the message bodies are in a TXT file attachment. So weird behavior across the board... here's some screenshot of it in action.</p>
  
  <p>Outlook Express:</p>
  
  <p><img src="https://i.stack.imgur.com/BH4Xv.png" alt="enter image description here"></p>
  
  <p>Outlook 2010:</p>
  
  <p><img src="https://i.stack.imgur.com/VHEnn.png" alt="enter image description here"></p>
  
  <p><a href="http://www.cwithb.com/test.eml" rel="nofollow noreferrer">Here's the actual EML file.</a></p>
  
  <p>Are we doing something wrong here by using RTF for the content type? It seems to have worked in the past and works with Outlook Express. It's been recommended to switch to the MSG format using Redemption instead of EML format to alleviate this but I believe that puts a prerequisite requirement on the user machine of either Outlook or the MAPI library.... but if the EML format isn't parsed the same by different products, then maybe the MSG format is the way to go.</p>