Multipart emails

Hi,

I use the multipart functionality from the action mailer and
I do in my Mailer model this:

class Mailer < ActionMailer::Base

def confirm(order)
subject ‘Your order’
recipients order[:email]
from ‘[email protected]
sent_on Time.now
body(:order => order)

content_type “multipart/alternative”

part :content_type => “text/html”,

:body => render_message(“confirm.text.html.rhtml”, :order =>

order)

part “text/plain” do |p|

p.body = render_message(“confirm.text.plain.rhtml”, :order =>

order)

p.transfer_encoding = “base64”

end

end
end

I can receive the email (in my production environment), but the content
type is always something like:

“Content-Type: text/html;
boundary=mimepart_45f03184878a7_1ddc15a2cfc76898250”

instead of the expected “Content-Type: multipart/alternative;
boundary=…”

I can clearly see the two parts (the plain text and the html), but not
one or the other. Always both at the same time with wrong character
encoding. I have tried to set the content_type explicitly, but no luck.

Am I missing something obvious? Any help appreciated!
Thanks in advance
Jens