1 # Configure ActionMailer SMTP settings
2 ActionMailer::Base.smtp_settings = {
3 :address => 'localhost',
5 :domain => 'localhost',
8 # Monkey patch to fix return-path bug in ActionMailer 2.2.2
9 # Can be removed once we go to 2.3
12 def sendmail(msgstr, from_addr, *to_addrs)
13 send_message(msgstr, from_addr.to_s.sub(/^<(.*)>$/, "\\1"), *to_addrs)
18 # Monkey patch to allow sending of messages in specific locales
21 adv_attr_accessor :locale
23 alias_method :old_render_message, :render_message
25 def render_message(method_name, body)
26 old_locale= I18n.locale
30 message = old_render_message(method_name, body)
32 I18n.locale = old_locale