Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to change the "From" name and email address for outgoing WordPress emails
<?php
add_filter( 'wp_mail_from', 'mycustom_wp_mail_from' );
function mycustom_wp_mail_from( $from_email ) {
return 'abc@xyz.com';
}
add_filter( 'wp_mail_from_name', 'mycustom_wp_mail_from_name' );
function mycustom_wp_mail_from_name( $from_name ) {
return 'John Doe';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment