Hey,
I have my application setup so that e-mail templates are stored in the
database, and each time an e-mail is sent out, a new entry is entered
into the database with the email_template_id, what e-mail-specific
variables must be included in the template (ex. a user''s first name, a
product URL, etc.) that change with each e-mail. A process then runs
in the background and takes these e-mails, replaces the e-mail-
specific variables into the template, and mails it out.
When the e-mail-specific variables are put in the database, they first
get converted into YAML, so if a user''s name was Brontë, it becomes
Bront\xC3\xAB in the YAML format.
When the variables (such as the first name) get loaded by the process
back into the e-mail from the database YAML, in IRB I see that the
body text of the e-mail has the name correctly converted back to
"Brontë":
In IRB:>> email_instance.get_body
=> "Hi Brontë (rest of email)
However, when this e-mail gets passed to ActionMailer and delivered,
the e-mail appears as:
Hi Bront=C3=AB,
The charset attribute on the e-mails is UTF-8 (the ActionMailer
default) which isn''t overridden when the mail is sent.
Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---