Skip to content

About

Reroute all CiviCRM emails to the specified email address.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Repository files navigation

com.skvare.rerouteemail

Screenshot

Overview

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.

Key Features

  • 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

Requirements

  • CiviCRM 5.0 or higher
  • PHP 7.4 or higher

Installation

  1. Download the extension from the CiviCRM Extensions Directory or clone from GitHub
  2. Extract the extension to your CiviCRM extensions directory
  3. Navigate to Administer > System Settings > Extensions
  4. Find "Reroute Email" in the list and click Install
  5. Enable the extension

Configuration

Web Interface Configuration

  1. Navigate to the configuration page: (Administer => System Settings => Reroute Email)

    http://yourdomain.com/civicrm/admin/rerouteemail
    
  2. Enable the Extension: Check the "Enable Reroute Email" checkbox

  3. Set Destination Email: Enter the email address where all emails should be redirected

  4. Save Settings: Click "Save" to apply your configuration

Programmatic 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';

Usage

Once configured and enabled:

  1. All CiviCRM emails will be automatically redirected to your specified address
  2. Original recipient information is preserved in email headers for debugging
  3. Email subject lines may include original recipient information
  4. The extension works transparently with all CiviCRM email functionality

Best Practices

  • 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

Troubleshooting

Common Issues

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.php is correct
  • Clear CiviCRM caches after making changes
  • Check file permissions on the settings file

Getting Help

If you encounter issues:

  1. Check the CiviCRM system log for any error messages
  2. Verify your CiviCRM and PHP versions meet the requirements
  3. Test with a simple transactional email first
  4. Review the extension's issue tracker on GitHub

Development

This extension is open source and welcomes contributions. The source code is available on GitHub at:

https://github.com/Skvare/com.skvare.rerouteemail

License

This extension is licensed under AGPL-3.0. This is an extension for CiviCRM.


Support

Contact us for support or to learn more.

Supporting Organizations

Skvare

About

Reroute all CiviCRM emails to the specified email address.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages