[ad_1]
Hello @wp-henne
we don’t have a hook within out plugin but you can use WordPress standard hooks. I use this snippet to redirect all email when I’m on a development site (domains ending with “.loc”):
// redirect all e-mails to me
if( strpos( $_SERVER['SERVER_NAME'], '.loc' ) ){
add_filter( 'wp_mail', function ( $args ) {
$args['to'] = '[email protected]';
$args['subject'] = '[' . $_SERVER['SERVER_NAME'] . '] ' . $args['subject'];
return $args;
}, 1000 );
}a simplified version could be:
add_filter( 'wp_mail', function ( $args ) {
$args['to'] = '[email protected]';
return $args;
}, 1000 );best regards, Hannes
