Elliott Blatt
2006-Dec-29 15:59 UTC
ActionMailer seems to ignore content-type specification
Hi, My employer would like me to send and html formatted email (Ugh!). This seems easy enough...I thought I''d just change: @headers[''Content-Type'']= "text/plain; charset=#{UserSystem::CONFIG[:mail_charset]}; format=flowed" to @headers[''Content-Type'']= "text/html; charset=#{UserSystem::CONFIG[:mail_charset]}; format=flowed" After restarting and running, the log still shows: Content-Type: text/plain; charset=utf-8 Not text/html, as I would have liked. And the markup does appear in the email body, contrary to my wishes. Any ideas? Elliott -- 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 -~----------~----~----~----~------~----~------~--~---
Elliott Blatt
2006-Dec-29 16:40 UTC
Re: ActionMailer seems to ignore content-type specification
I got it. I re-read the doc, and found that I needed to do this: content_type "text/html; charset=#{UserSystem::CONFIG[:mail_charset]}; format=flowed" rather than this @headers[''Content-Type'']= "text/html;charset=#{UserSystem::CONFIG[:mail_charset]}; format=flowed" Elliott Blatt wrote:> Hi, > > My employer would like me to send and html formatted email (Ugh!). > This seems easy enough...I thought I''d just change: > > @headers[''Content-Type'']= "text/plain; > charset=#{UserSystem::CONFIG[:mail_charset]}; format=flowed" > > to > > @headers[''Content-Type'']= "text/html; > charset=#{UserSystem::CONFIG[:mail_charset]}; format=flowed" > > > After restarting and running, the log still shows: > > Content-Type: text/plain; charset=utf-8 > > Not text/html, as I would have liked. And the markup does appear in the > email body, contrary to my wishes. > > Any ideas? > > Elliott-- 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 -~----------~----~----~----~------~----~------~--~---