programming

Change WordPress Email default From Name and Email address

/**
* change WordPress default FROM Name and Email address
**/
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
function new_mail_from($old) {
$email = get_option( 'admin_email' );
return $email; //return any email you want to be used as From Email
}
function new_mail_from_name($old) {
$site_name = get_option( 'blogname');
return $site_name; //return any Name you want to be used as From Name
}

Comments are closed.