You have to use a multipart email - Recipe 67 in the Rails Recipes
book covers this, and also more information in the ActionMailer docs: Peak Obsession
Hope that helps,
David
Hi David!
I followed the same procedure but i did not get the solution please
It looks like the templates for each format aren’t set up properly -
just to check the obvious, make sure that your plain.rhtml is actually
just plain text and doesn’t have any HTML tags. I haven’t worked with
Action Mailer in the past, so I’m not sure how much more help I can
be.
It looks like the templates for each format aren’t set up properly -
just to check the obvious, make sure that your plain.rhtml is actually
just plain text and doesn’t have any HTML tags. I haven’t worked with
Action Mailer in the past, so I’m not sure how much more help I can
be.
Well, you don’t give your code, but here’s an example that will
generate a multi-part email. Note that if your message template is
named “multipart_alternative.rhtml”, then the content_type picks it
up as the first part and then two more get added.
If this is your problem, change the name in the render_message and on
the actual file and try it again.
-Rob
I realized exactly what you said just few hours after my post,
i renamed my html view file to action_name_html.rhtml and all works
as expected.
What happened was that AM picked up default html template
because its name was the same as name of action and then also
it was added as part of message… through:
“:body => render_message(“reservation_email_plain””
On Jul 6, 2006, at 11:13 AM, Miroslav Zahorak wrote:
Content-Type: text/html; charset=utf-8
Hi guys,
I have the same problem, HTML part ofthe message is in emial twice,
It looks ok in Apple Mail, but in
MS Outlook it shows just as html code…
Anybody any idea?
Miro
Well, you don’t give your code, but here’s an example that will
generate a multi-part email. Note that if your message template is
named “multipart_alternative.rhtml”, then the content_type picks it
up as the first part and then two more get added.
If this is your problem, change the name in the render_message and on
the actual file and try it again.