The Mail Redirect module redirects ALL system generated email to a test mail domain. This is especially useful when doing site testing which uses a production database which is populated with real email addresses.

Works with any mail generated by drupal_mail() and with included patch applied (D5 only) any module that uses mimemail. Patch not required with D6 and at least alpha8 version of mimemail.

General Usage:

redirect any system generated email to your configured email domain
usage:
- in your test site's settings.php set:
$conf = array('mail_redirect_domain' => "mydomain.com");

result:
- input $to: john_smith@about.com
- output $to: john_smith@mydomain.com

This module was developed for a multi-developer test environment where ongoing development work runs in parallel with the operation of the production site. The developers regularly sync their test site's db to that of the production server. Our general development environment provides numerous sites folders for a mutli-site setup so that each developer has their own local and server based sandboxes for testing and development. As an example:

3 developers: tom, joe, hank

site folders as:
- www.oursite.com (production site)
- oursite.joe (joe's local)
- oursite.tom
- oursite.hank
- joe.oursite.com (joe's server sandbox)
- hank.oursite.com
- tom.oursite.com

Set up subdomains on a shared host account (we use Dreamhost.com) which provides unlimited subdomains and catch-all email accounts.

e.g. mail domains:
- joe.somedomain.com
- hank.somedomain.com

Set each of these up with catch-all mail accounts.

For Joe's local development system (oursite.joe):
- in sites/oursite.joe/settings.php
- defined $conf = array('mail_redirect_domain' => "joe.somedomain.com");

Now, when mail_redirect module is enabled all the site email will redirect to that domain. E.g.:

Janet_Smith@gmail.com -> Janet_Smith@joe.somedomain.com

All mail will be sent to one catch-all account and it is possible to see what email the system has sent out and who they have been sent to.

This project was designed by LiquidCMS and funded by LifeWire, a NY Times Company.

Drupal 6

I have tested my module with alpha8 version of mimemail and it seems to work without requiring the patch - very cool!!

Drupal 6 release funded by ConsumerSearch.com, a NY Times Company.

Drupal 7

Have not yet tested with mimemail but since alpha8 version of D6 mimemail works with no patching required; I assume D7 likely works with mimemail as well. Please post if you have tested.

Downloads

Recommended releases

Version Downloads Date Links
7.x-1.0 tar.gz (9.06 KB) | zip (10.9 KB) 2011-Jan-05 Notes
6.x-1.2 tar.gz (9.06 KB) | zip (10.76 KB) 2010-Jul-14 Notes
5.x-1.1 tar.gz (8.49 KB) | zip (9.7 KB) 2008-Jun-27 Notes

Development releases

Version Downloads Date Links
6.x-1.x-dev tar.gz (9.03 KB) | zip (10.63 KB) 2011-Feb-25 Notes

Project Information


Maintainers for Mail Redirect

  • liquidcms - 8 commits
    last: 1 year ago, first: 3 years ago

Issues for Mail Redirect

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Oldest open issue: 22 Oct 10