]> git.openstreetmap.org Git - rails.git/blob - config/initializers/action_mailer.rb
Replace various HTML entities with normal characters
[rails.git] / config / initializers / action_mailer.rb
1 # Configure ActionMailer SMTP settings
2 ActionMailer::Base.smtp_settings = {
3   :address => 'localhost',
4   :port => 25, 
5   :domain => 'localhost',
6 }
7
8 # Monkey patch to allow sending of messages in specific locales
9 module ActionMailer
10   class Base
11     adv_attr_accessor :locale
12
13     def mail_with_locale(*args)
14       old_locale= I18n.locale
15
16       begin
17         I18n.locale = @locale
18         message = mail_without_locale(*args)
19       ensure
20         I18n.locale = old_locale
21       end
22
23       message
24     end
25
26     alias_method_chain :mail, :locale
27   end
28 end