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'
end

More information can be found at the gem’s github page.

You can follow any response to this post through the Atom feed.

Avatar

Fri, 23 Jul 2010 15:02:00 GMT

by arne

Tags:

  • Morgan Currie said about 1 month later:

    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

  • Arne said about 1 month later:

    Everyone else wo is sending HTML e-mails can now get version 0.2.0 of Mail Magnet which includes Morgan’s changes.

Leave a comment