# Issues with sending HTML-mail

**URL:** <https://discuss.rubyonrails.org/t/issues-with-sending-html-mail/3194>\
**Category:** rubyonrails-talk\
**Created:** [October 17, 2006, 10:32am UTC](https://discuss.rubyonrails.org/t/issues-with-sending-html-mail/3194 "2006-10-17T10:32:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard.johansson](https://avatars.discourse-cdn.com/v4/letter/r/a9a28c/32.png) [@richard.johansson](https://discuss.rubyonrails.org/u/richard.johansson)\
**Post date:** [October 17, 2006, 10:32am UTC](https://discuss.rubyonrails.org/t/issues-with-sending-html-mail/3194/1 "2006-10-17T10:32:44Z")

</div>

Hi,

Im running an application sending quite a few emails to members. Im building the emails with your every day ActionMailer builders, setting the content\_type to "text/html" and charset to "utf-8".

Now im hearing reports from some of our members that the emails show up as plain html-text in their clients. One such case is a user running the DWmail web based email client. ([http://www.dominion-web.com/products/dwmail/](http://www.dominion-web.com/products/dwmail/)) The website states that the client is supporting html mail, and the user in question doesnt experience the problem with other distributors of html-mail.

Could this be related to some rails-issue, and if so are there any tickets in the track?

Or, could i build my emails in some other way to extend the compability?

Thanks, Richard Johansson richard.johansson@gmail.com

---

<div class="post-metadata">

**Author:** ![Jens1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Jens1](https://discuss.rubyonrails.org/u/Jens1)\
**Post date:** [October 17, 2006, 3:30pm UTC](https://discuss.rubyonrails.org/t/issues-with-sending-html-mail/3194/2 "2006-10-17T15:30:53Z")

</div>

Hi,

sending HTML mail (half offtopic here I guess) is very fragile. Here's all the headers that I \*had\* to use to make all webmail clients, even the totall broken IncrediMail & Co, and IMP (which is extremely anal retentive about standards, but at least \*right\*) display my mails correctly.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Content-Type: text/html; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Charset=utf-8 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MIME-Version: 1.0

The "Charset" has to be capital C and indented with a TAB or 8 spaces (otherwise some webmail clients choke on the mail). The MIME-Version: 1.0 is required by at least IMP. Some won't display the mail if it doesn't have a correctly formatted From: and To: header - "From: undisclosed-recipients:;" for example, has to have colon AND semicolon.

But my guess is that you forgot MIME-Version. 😉

Jens
