The CiviCRM Reroute Email extension provides essential email redirection functionality for development, staging, and testing environments. This extension intercepts all outgoing CiviCRM transactional emails and mailings, redirecting them to a specified email address instead of their original recipients.
This powerful tool prevents accidental email delivery to real contacts during development and testing phases, making it an indispensable utility for CiviCRM developers and administrators.
- Complete Email Interception: Redirects all CiviCRM emails including transactional messages and mass mailings
- Easy Configuration: Simple web-based configuration interface
- Override Support: Configure settings programmatically via
civicrm.settings.php - Development-Safe: Prevents accidental emails to real contacts during testing
- Lightweight: Minimal impact on system performance
- CiviCRM 5.0 or higher
- PHP 7.4 or higher
- Download the extension from the CiviCRM Extensions Directory or clone from GitHub
- Extract the extension to your CiviCRM extensions directory
- Navigate to Administer > System Settings > Extensions
- Find "Reroute Email" in the list and click Install
- Enable the extension
-
Navigate to the configuration page: (
Administer=>System Settings=>Reroute Email)http://yourdomain.com/civicrm/admin/rerouteemail -
Enable the Extension: Check the "Enable Reroute Email" checkbox
-
Set Destination Email: Enter the email address where all emails should be redirected
-
Save Settings: Click "Save" to apply your configuration
For automated deployments or environment-specific configurations, you can override settings in your civicrm.settings.php file:
// Enable reroute email functionality
$civicrm_setting['Reroute Extension Settings']['rerouteemail_enable'] = 1;
// Set the destination email address
$civicrm_setting['Reroute Extension Settings']['rerouteemail_email'] = 'test@yourdomain.com';Once configured and enabled:
- All CiviCRM emails will be automatically redirected to your specified address
- Original recipient information is preserved in email headers for debugging
- Email subject lines may include original recipient information
- The extension works transparently with all CiviCRM email functionality
- Use Descriptive Email Addresses: Choose redirect addresses that clearly indicate their purpose (e.g.,
dev-emails@yourorg.com) - Monitor Your Test Inbox: Regularly check the redirect inbox to ensure emails are being captured
- Document Your Setup: Keep team members informed about active email redirection
- Disable in Production: Always ensure this extension is disabled on production environments
Emails Not Being Redirected
- Verify the extension is enabled in the configuration interface
- Check that the destination email address is valid
- Ensure CiviCRM's email settings are properly configured
Configuration Not Saving
- Verify you have administrative permissions in CiviCRM
- Check for any PHP errors in your server logs
- Ensure the database connection is stable
Settings Override Not Working
- Verify the syntax in
civicrm.settings.phpis correct - Clear CiviCRM caches after making changes
- Check file permissions on the settings file
If you encounter issues:
- Check the CiviCRM system log for any error messages
- Verify your CiviCRM and PHP versions meet the requirements
- Test with a simple transactional email first
- Review the extension's issue tracker on GitHub
This extension is open source and welcomes contributions. The source code is available on GitHub at:
https://github.com/Skvare/com.skvare.rerouteemail
This extension is licensed under AGPL-3.0. This is an extension for CiviCRM.
Contact us for support or to learn more.
