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 ''support-qO/DfhF8JAjCXR85Y8Hu3Q@public.gmane.org''
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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---