Restricts outbound emails to a list of defined email domains and addresses.
Quick links: Installation
-
Add the plugin as submodule.
git submodule add --name disable-external-emails [email protected]:netzstrategen/wordpress-disable-external-emails.git wp-content/mu-plugins/disable-external-emails
-
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';
-
Configure a list of allowed email domains and addresses in
wp-config.php
:const DISABLE_EXTERNAL_EMAILS_EXCEPT = '@example.com, [email protected], @netzstrategen.com';
Originally authored by Bogdan Arizancu and Daniel Kudwien.