Forum: Ruby on Rails forcing delivery of plain text email when both plain text and html templates are present

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
lunaclaire (Guest)
on 2009-03-18 23:57
(Received via mailing list)
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

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.
This topic is locked and can not be replied to.