Change WordPress “from” email address and name

This is short an sweet. By default, WordPress email notification address looks like [email protected].

If you want to use the site’s real email address and name for system notification to you or user add the code below to your theme’s functions.php file. The fist 3 lines will modify the default email address and the next will change the default name to your site’s name.

//Use the admin email for emails
function change_mail_from( ){
    return get_bloginfo( 'admin_email' );
}add_filter('wp_mail_from', 'change_mail_from', 100 );

//Use the site name for emails
function change_mail_from_name( ){
    return get_bloginfo( 'name' );
}add_filter('wp_mail_from_name', 'change_mail_from_name', 100 );