Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
/ mail_magnet Public archive

Mail Magnet allows you to override e-mail recipients in ActionMailer so all mails go to a given address. This library is UNMAINTAINED. Use the official ActionMailer::Base.register_interceptor API instead: https://makandracards.com/makandra/46094-rails-how-to-write-custom-email-interceptors

License

Notifications You must be signed in to change notification settings

makandra/mail_magnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mail Magnet

Mail Magnet allows you to override e-mail recipients in ActionMailer so all mails go to a given address. This is useful for staging environments where you want to test production-like mail delivery without sending e-mails to real users.

Installation

Install the gem with

sudo gem install mail_magnet

In the environment for which you’d like to override mail recipients:

config.gem 'mail_magnet'
config.after_initialize { ActionMailer::Base.override_recipients = 'overridden@example.com' }

Now all e-mail sent by your ActionMailers goes to ‘overridden@example.com’ (including CC and BCC recipients). The original recipients will be quoted inside the mail body, like this:

- - - Original recipients - - -
To: original.to@example.com
Cc: original.cc@example.com
Bcc: original.bcc@example.com
- - - - - - - - - - - - - - - -

Original e-mail body goes here.

Rails 3 compatibility

We cannot guarantee Rails 3 compatibility at this point, but we will upgrade the gem when Rails 3 is released.

Credits

Arne Hartherz

makandra.com

gem-session.com

About

Mail Magnet allows you to override e-mail recipients in ActionMailer so all mails go to a given address. This library is UNMAINTAINED. Use the official ActionMailer::Base.register_interceptor API instead: https://makandracards.com/makandra/46094-rails-how-to-write-custom-email-interceptors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages