Mail Magnet makes your e-mails go where you want them
Remember that nifty way to override e-mail recipients we showed you a while ago? It evolved into a gem: Mail Magnet makes changing e-mail recipients for your staging environments even easier.
Just go with a sudo gem install mail_magnet and add something like this to your staging environment file:
config.gem 'mail_magnet'
config.after_initialize do
ActionMailer::Base.override_recipients = 'overridden@example.com'
endMore information can be found at the gem’s github page.
You can follow any response to this post through the Atom feed.



Hey guys, Great job on this gem! I was setting up our app to use mail_magnet in both development and staging environments today, but as we send all HTML e-mails, the output was getting smushed together. I forked mail_magnet and updated it to differentiate between text/plain and text/html content_types, with 3 new tests to verify the behaviour. Check it out here: http://github.com/morgancurrie/mail_magnet
Everyone else wo is sending HTML e-mails can now get version 0.2.0 of Mail Magnet which includes Morgan’s changes.