Multipart mail order with devise and rails

Seems like the most trivial thing to do, but I could not find any information about changing the sort order when sending multipart emails from devise.

First, create a custom mailer for devise https://github.com/plataformatec/devise/wiki/How-To:-Use-custom-mailer

Then add parts_order to the default hash.

1
2
3
class DeviseMailer < Devise::Mailer
  default from: 'user@domain.com', parts_order: [ "text/plain", "text/html" ]
end

Thats it. And oh, this works for any other mailer to.

Posted in Programming at March 27th, 2013. Trackback URI: trackback Tags: , , Written by: 

It's past my bedtime is using WP-Gravatar