# Forcing delivery of plain text email when both plain text and html templates are present

**URL:** <https://www.ruby-forum.com/t/forcing-delivery-of-plain-text-email-when-both-plain-text-and-html-templates-are-present/163287>\
**Category:** Rails\
**Created:** [March 18, 2009, 10:57pm UTC](https://www.ruby-forum.com/t/forcing-delivery-of-plain-text-email-when-both-plain-text-and-html-templates-are-present/163287 "2009-03-18T22:57:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunaclaire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f4b2a3/32.png) [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Post date:** [March 18, 2009, 10:57pm UTC](https://www.ruby-forum.com/t/forcing-delivery-of-plain-text-email-when-both-plain-text-and-html-templates-are-present/163287/1 "2009-03-18T22:57:42Z")

</div>

I have a new user requirement that’s causing a problem…

I have a user notification for which I build both plaintext and html  
templates and rails takes care of assembling a multipart/alternative  
msg that contains both parts. All good.

But, now some users with Blackberry’s are complaining that they’d  
rather have just the text version. I thought their client would take  
care of displaying that, but perhaps they need to set something up and  
you can never really count on users to do so, so I’m looking at a new  
user pref to explicitly request plain text emails.

The problem: Since I have both types of templates, I cant figure out  
how to only send the ‘text/plain’ one.

I tried explicitly setting the content\_type to this, but I still get  
the multipart/alternative result.

Does anyone know how to force the content\_type format sent in this  
situation?

Note: I could set up a diff method in the mailer using a diff name  
where only the plain text template was present, but that would be  
kludgey and not very DRY.
