How to change the default WordPress sender name and email address

To change the default sender name and email address, simply paste this code snippet into your (child-)theme’s functions.php:

// Function to change email address
function wpb_sender_email( $original_email_address ) {
    return '[email protected]';
}
add_filter( 'wp_mail_from', 'wpb_sender_email' );

 
// Function to change sender name
function wpb_sender_name( $original_email_from ) {
    return 'YOUR SENDER NAME';
}
add_filter( 'wp_mail_from_name', 'wpb_sender_name' );

 

Leave a Comment

Your email address will not be published. Required fields are marked *