DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

By default, the default WordPress email adress looks like WordPress@yoursitename.com. Want to use your real email and username instead? Just read this recipe.

This recipe is pretty easy to implement: Just paste the following code into your functions.php theme:

function res_fromemail($email) {
    $wpfrom = get_option('admin_email');
    return $wpfrom;
function res_fromname($email){
    $wpfrom = get_option('blogname');
    return $wpfrom;

add_filter('wp_mail_from', 'res_fromemail');
add_filter('wp_mail_from_name', 'res_fromname');

Thanks to KeenTricks for the cool tip!



  1. Thanks for this cool tip, makes the email look much better. We need to be unique and not have the same stuff.

    I just implemented this and it worked with no issue, I even tested it.

  2. Thanks, I was looking for this hack!

  3. Superb recipe….many thanks for sharing!

  4. José Miguel

    Thank u!! The code in functions.php is working perfectly.

    See u!!

  5. I’ve been looking for this, thank you!

  6. Thanks a lot.

    Can I also modify the header so that all the external communication from my site will have unsubscribe-list (http://www.list-unsubscribe.com/ )attached to the email header?

  7. Any experience using this on a WooCommerce setup? I’ve tried the ‘WP From Email’ plugin, and your solution…but no success.

    Don’t want to hack the core…

  8. Hi,
    Sorry if a dumb Q, but does it matter where the code goes into the functions.php file?

    Oh, and since we shouldn’t mess with the core code anyway, do we need to have a new blank functions.php file in our child theme…

    Or have I lost the plot?

Leave a Comment

Your email address will not be published. Required fields are marked *