Created
September 9, 2009 23:24
-
-
Save edavis10/184168 to your computer and use it in GitHub Desktop.
Patch TMail/ActionMailer to deliver all email to one address in staging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Send all mail to a single address in staging | |
if RAILS_ENV == 'staging' | |
STAGING_EMAIL_ADDRESS = '[email protected]' | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment