Some of my Mailer templates are in spanish, I get this error message : /usr/local/rvm/gems/ruby-1.9.2-p136@rails3/gems/actionpack-3.0.5/lib/ action_view/template/handlers/erb.rb:129:in `valid_encoding': Your template was not saved as valid US-ASCII. Please either specify US- ASCII as the encoding for your template in your text editor, or mark the template with its encoding by inserting the following as the first line of the template: (ActionView::Template::Error)
# encoding: <name of correct encoding>.
The source of your template was:
... Recibes este mensaje porque has mandado un email a <%= @receiver %> PERDONA LA DEMORA Estamos actualizando la cantidad de registraciones regaladas. ...
I coded the Notifier like this :
class Notifier < ActionMailer::Base default :charset => "utf-8" .. mail(:to => destination, :subject => subject, :from => from) do |format| format.text(:content_transfer_encoding => "base64") format.html(:content_transfer_encoding => "base64") end
but this doesn't get rid of the error.... how & where should I write the encoding information