Skip to content

Instantly share code, notes, and snippets.

@cball
Created November 22, 2011 18:32
Show Gist options
  • Save cball/1386456 to your computer and use it in GitHub Desktop.
Save cball/1386456 to your computer and use it in GitHub Desktop.
Send all email on QA/Staging to alternate address
# add to config/initializers
if hostname =~ /qa/ || Rails.env.staging?
class OverrideMailRecipient
def self.delivering_email(mail)
mail.to = "mail@qa.wee.net"
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