Hi

I'm trying to send multipart emails with something like this:

Taken from http://api.rubyonrails.org/classes/ActionMailer/Base.html
[code=] class ApplicationMailer < ActionMailer::Base
    def signup_notification(recipient)
      recipients      recipient.email_address_with_name
      subject         "New account information"
      from            "[email protected]"
      content_type    "multipart/alternative"

      part :content_type => "text/html",
        :body => render_message("signup-as-html", :account =>
recipient)

      part "text/plain" do |p|
        p.body = render_message("signup-as-plain", :account =>
recipient)
        p.transfer_encoding = "base64"
      end
    end
  end[/code]
I have 2 view files signup-as-html.text.html.erb and signup-as-
plain.text.plain.erb

I sent a test email and picked it up in Apple Mail but it displays the
HTML code instead of rendering it.

Any idea why?

Mark
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to