Select Page

Do you want to change the default FROM Name WordPress uses in the emails? This includes notification emails WordPress sends you and all other users on your website. It also includes the FROM name WordPress might use in a contact form.

Add this code to your theme’s functions.php file to change the FROM name:

function change_default_from_name($name) {
	return 'John Doe'; // All emails by default will now be sent from this FROM Name.
}
// Add a filter function for the wp_mail_from_name filter.
add_filter('wp_mail_from_name','change_default_from_name');

The above code will change the default FROM name to John Doe. Replace John Doe with the default name you want to use.

You can also change the default FROM email address of all emails using this script:

function change_default_from_email($name) {
	return '[email protected]'; // All emails by default will now be sent from this FROM Email.
}
// Add a filter function for the wp_mail_from filter.
add_filter('wp_mail_from','change_default_from_email');