]> git.openstreetmap.org Git - rails.git/blob - config/initializers/action_mailer.rb
Add CC BY-SA 2.0 copyright/attribution/license attributes to <osm>
[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   :enable_starttls_auto => false
7 }
8
9 # Monkey patch to allow sending of messages in specific locales
10 module ActionMailer
11   class Base
12     def mail_with_locale(*args)
13       old_locale = I18n.locale
14
15       begin
16         I18n.locale = @locale
17         message = mail_without_locale(*args)
18       ensure
19         I18n.locale = old_locale
20       end
21
22       message
23     end
24
25     alias_method_chain :mail, :locale
26   end
27 end