Prashant Tiwari
2006-Jun-09 06:47 UTC
[Rails] How to send html formated messages through E-mail?
Hi, I want to send mail trough my rails application. Currently I am able to send messages with content-type="text/plain". But when I am trying to send messages in html format, the recepient receives messages but it''s in the plain text format with heml tags also gets displayed in ythe message. How to avoid it? & how to send html message through my application? Please help me.(I am using Actionmailer for sending mails...) Thanx Pras -- Posted via http://www.ruby-forum.com/.
Michel Dogger
2006-Jun-09 07:10 UTC
[Rails] Re: How to send html formated messages through E-mail?
Most likely you need the following line, in your method in the ActionMailer (models) content_type "text/html" for example: def activate(account) @subject = ''Subject'' @recipients = account.email @from = ''foo@foo.com'' @body[''account''] = account content_type "text/html" <-- end hope it works for you, micheldogger -- Posted via http://www.ruby-forum.com/.