Reroute email module
An extremely useful module for certain projects is reroute email:
This module intercepts all outgoing emails from a Drupal site and reroutes them to a predefined configurable email address.
This is useful in case where you do not want email sent from a Drupal site to reach the users. For example, if you copy a live site to a test site for the purpose of development, and you do not want any email sent to real users of the original site. Or you want to check the emails sent for uniform formatting, footers, ...etc.
Set up the module as follows:
- Enable the module on the live site.
- Make sure the email address is configured (get the box to show up to temporarily click enable rerouting, then disable it again, email address will stick).
- In a developer's machine make sure you have this in the settings.php:
$conf['reroute_email_enable'] = 1;
Now if you take a backup, rerouting is automatically enabled. Another possibility perhaps, not tested, might be to do the reverse: always enable reroute email, but on the live site set the enable option in settings.php to false, so developers don't even have to set it.