source: subversion/sites/rails_port/config/initializers/action_mailer.rb @ 14981

Last change on this file since 14981 was 14981, checked in by tomhughes, 10 years ago

Set a custom return path so that we can ignore bounces.

File size: 395 bytes
Line 
1# Configure ActionMailer
2ActionMailer::Base.smtp_settings = {
3  :address => 'localhost',
4  :port => 25, 
5  :domain => 'localhost',
6}
7
8# Monkey patch to fix return-path bug in ActionMailer 2.2.2
9# Can be removed once we go to 2.3
10module Net
11  class SMTP
12    def sendmail(msgstr, from_addr, *to_addrs)
13      send_message(msgstr, from_addr.to_s.sub(/^<(.*)>$/, "\\1"), *to_addrs)
14    end
15  end
16end
Note: See TracBrowser for help on using the repository browser.