Prevent sending emails from non-production environments
- Run
composer require globalis/wpg-mail-trapping
or addwpg-mail-trapping.php
to yourmu-plugins
directory
-
Add
define('WPG_MAIL_TRAPPING', serialize(['you@example.com']));
in your wp-config.php file. -
If you want to disable the mail trapping, set the constant to false:
define('WPG_MAIL_TRAPPING', false);