]> git.openstreetmap.org Git - rails.git/blob - config/initializers/action_mailer.rb
Put ActionMailer configuration in the right place.
[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 # This will let you more easily use helpers based on url_for in your mailers.
9 ActionMailer::Base.default_url_options[:host] = APP_CONFIG['host']
10
11 # Monkey patch to fix return-path bug in ActionMailer 2.2.2
12 # Can be removed once we go to 2.3
13 module Net
14   class SMTP
15     def sendmail(msgstr, from_addr, *to_addrs)
16       send_message(msgstr, from_addr.to_s.sub(/^<(.*)>$/, "\\1"), *to_addrs)
17     end
18   end
19 end