Change the Default Sender Email Address in WordPress

Do you want to change the default sender name and email address for outgoing WordPress emails? By default, WordPress uses ‘WordPress’ as the sender name for all outgoing WordPress notification emails. In this quick tutorial, we will show you how to change the default sender name and email address in WordPress.

First make sure you have a child theme installed. If you don’t have one, I suggest you read the following post first:

Create and Install Your Own Divi Child Theme

To change the default sender address in WordPress, do the following:

From your WP Dashboard, navigate to Appearance > Editor > functions.php.

Add the following code to your functions.php file: 

// Function to change email address
function wpb_sender_email( $original_email_address ) {
    return 'info@divirealm.com';
}

// Function to change sender name
function wpb_sender_name( $original_email_from ) {
    return 'DiviRealm';
}

// Hooking up our functions to WordPress filters
add_filter( 'wp_mail_from', 'wpb_sender_email' );
add_filter( 'wp_mail_from_name', 'wpb_sender_name' );

You only want to change the email address and sender name, ensure you add the the code after the closing bracket, as below:

Hit save and you’re all done, from now on all your email will use the sender name and email address you’ve entered into the functions.php file.

Care to Share

Share this post with your friends!