edavis10 (owner)

Revisions

gist: 184168 Download_button fork
public
Description:
Patch TMail/ActionMailer to deliver all email to one address in staging
Public Clone URL: git://gist.github.com/184168.git
Embed All Files: show embed
90-staging.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Send all mail to a single address in staging
if RAILS_ENV == 'staging'
  STAGING_EMAIL_ADDRESS = 'staging@foo.com'
  
  module TMail
    class Mail
     def destinations
       [STAGING_EMAIL_ADDRESS]
     end
     def to=( *strs )
       set_string_array_attr 'To', [STAGING_EMAIL_ADDRESS]
     end
     def cc=( *strs )
       set_string_array_attr 'To', [STAGING_EMAIL_ADDRESS]
     end
     def bcc=( *strs )
       set_string_array_attr 'To', [STAGING_EMAIL_ADDRESS]
     end
    end
  end
end