Created
November 22, 2011 18:32
-
-
Save cball/1386456 to your computer and use it in GitHub Desktop.
Send all email on QA/Staging to alternate address
This file contains 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
# add to config/initializers | |
if hostname =~ /qa/ || Rails.env.staging? | |
class OverrideMailRecipient | |
def self.delivering_email(mail) | |
mail.to = "[email protected]" | |
end | |
end | |
ActionMailer::Base.register_interceptor(OverrideMailRecipient) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment