Force WordPress core system emails to use a specific from address & name.

11/17/2025
Back to Gists
<?php
/**
 * Force WordPress core system emails to use a specific from address & name.
 */
add_filter( 'wp_mail_from', function( $email ) {
    return 'no-reply@yourdomain.com'; // your domain address
});

add_filter( 'wp_mail_from_name', function( $name ) {
    return 'From Name'; // whatever label you want
});