WP Manifestindependent plugin directory
manifest / email / wordpress-disable-external-emails

Disable external emails

Prevents accidental sending of emails to external recipients from non-production environments.

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/netzstrategen/wordpress-disable-external-emails/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Restricts outbound emails to a list of defined email domains and addresses.

Quick links: Installation

Installation

Install as Git submodule

  1. Add the plugin as submodule.

     git submodule add --name disable-external-emails git@github.com:netzstrategen/wordpress-disable-external-emails.git wp-content/mu-plugins/disable-external-emails
  2. Add a must-use plugin loader file wp-content/mu-plugins/disable-external-emails.php:

     <?php
    
     /*
       Plugin Name: Disable external emails
       Version: 1.0.0
       Description: Prevents accidental sending of emails to external recipients during development.
       Author: netzstrategen
       Author URI: https://netzstrategen.com
     */
    
     require_once __DIR__ . '/disable-external-emails/disable-external-emails.php';
  3. Configure a list of allowed email domains and addresses in wp-config.php:

     const DISABLE_EXTERNAL_EMAILS_EXCEPT = '@example.com, exact@example.com, @netzstrategen.com';

Come create with us!

Originally authored by Bogdan Arizancu and Daniel Kudwien.