Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Easily customise the name and email address of WordPress emails
* Used to filter email from 'address'
function hd_email_send_wp_mail_address( $input ) {
// return a new from email address.
return '';
add_filter( 'wp_mail_from', 'hd_email_send_wp_mail_address' );
* Used to filter email from 'name'
function hd_email_send_wp_mail_name( $input ) {
return __( 'Highrise Digital' ); // you can set this string to whatever you want.
add_filter( 'wp_mail_from_name', 'hd_email_send_wp_mail_name' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment