Method 3: Manually Change Sender Name and Email Address
This method is not recommended for beginners. This method requires you to paste code into your WordPress files. It also does not fix any email deliverability issues and is harder to troubleshoot.
If you are new to adding code in WordPress, then take a look at our beginners guide on pasting snippets from web into WordPress.
You will need to add the following code in your theme’s functions.php file or a site-specific plugin.
1 2 3 4 5 6 7 8 9 10 11 12 13 | // Function to change email address function wpb_sender_email( $original_email_address ) { return 'tim.smith@example.com' ; } // Function to change sender name function wpb_sender_name( $original_email_from ) { return 'Tim Smith' ; } // Hooking up our functions to WordPress filters add_filter( 'wp_mail_from' , 'wpb_sender_email' ); add_filter( 'wp_mail_from_name' , 'wpb_sender_name' ); |
This code simply replaces the default WordPress sender name and email address with your custom sender name and email address.