Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Update email “from name” sent by wp_mail()

Modify the “from name” used in the wp_mail() function, using ‘wp_mail_from_name’ filter.

function wp_mail_from_name( $from_name ) {
	return __( 'Name' );
}
add_filter( 'wp_mail_from_name', 'wp_mail_from_name', 10, 1 );