# Action Mailer and HTML

**URL:** <https://www.ruby-forum.com/t/action-mailer-and-html/140168>\
**Category:** Rails\
**Created:** [June 11, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/action-mailer-and-html/140168 "2008-06-11T14:49:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mex23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mex23](https://www.ruby-forum.com/u/mex23)\
**Post date:** [June 11, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/action-mailer-and-html/140168/1 "2008-06-11T14:49:07Z")

</div>

I have a problem with HTML email and Outlook;

no matter what I do, Outlook displays email like Text and not like  
formatted HTML.

If I send the same to Yahoo or Google email account, received emails are  
HTML rendered, without any problem;

In Action Mailer Model i put

@content\_type = “text/html”

and in my Email view:

plus standard Html tag (HTML, HEAD, BODY).

Any ideas?

Thanks in advance

Stefano

---

<div class="post-metadata">

**Author:** ![mex23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mex23](https://www.ruby-forum.com/u/mex23)\
**Post date:** [June 11, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/action-mailer-and-html/140168/2 "2008-06-11T14:53:59Z")

</div>

On 11 Jun 2008, at 13:49, Stefano B. wrote:

> plus standard Html tag (HTML, HEAD, BODY).

If you use XHTML you must use lowercase tags (html, head, body). Not  
sure that it fixes your Outlook problem, but at least it’s a start.

---

<div class="post-metadata">

**Author:** ![mex23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mex23](https://www.ruby-forum.com/u/mex23)\
**Post date:** [June 11, 2008, 3:06pm UTC](https://www.ruby-forum.com/t/action-mailer-and-html/140168/3 "2008-06-11T15:06:46Z")

</div>

Robert Claeson wrote:

> If you use XHTML you must use lowercase tags (html, head, body). Not  
> sure that it fixes your Outlook problem, but at least it’s a start.

Thanks Robert, I have just tried your suggestion without any luck…

---

<div class="post-metadata">

**Author:** ![mex23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mex23](https://www.ruby-forum.com/u/mex23)\
**Post date:** [June 11, 2008, 5:59pm UTC](https://www.ruby-forum.com/t/action-mailer-and-html/140168/4 "2008-06-11T17:59:47Z")

</div>

Ciao Stefano,

Are you sure that Outlook options aren’t overriding the @content/type  
statement?  
If the user configured Outlook not to display HTML but just convert it  
to plain text, no matter what you set in the code - he will always get  
it as simple text.

Rey9999

On 11 Giu, 15:06, Stefano B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![mex23](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@mex23](https://www.ruby-forum.com/u/mex23)\
**Post date:** [June 11, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/action-mailer-and-html/140168/5 "2008-06-11T22:27:06Z")

</div>

Rey9999 wrote:

> Ciao Stefano,
> 
> Are you sure that Outlook options aren’t overriding the @content/type  
> statement?  
> If the user configured Outlook not to display HTML but just convert it  
> to plain text, no matter what you set in the code - he will always get  
> it as simple text.
> 
> Rey9999
> 
> On 11 Giu, 15:06, Stefano B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Rey9999,

many thanks for your suggestion.

It’s silly but this was my problem. It was not related to outlook  
settings anyway; Mdaemon antispam was responsible of this strange email  
behaviour…

Greetings

Stefano
