Emails from WordPress

When my emails get sent out to Affiliates it comes from WordPress@mywebsite.com

How can I change that to be from a different email address and not wordpress?

Thanks,

Jo


Comments

One response to “Emails from WordPress”

  1. Hi Jo,

    The mail from address and name are within the core functionality of WordPress but you can modify them with two snippets.

    add_filter( 'wp_mail_from', 'example_wp_mail_from' );
    function example_wp_mail_from( $original_email_address ) {
    //Make sure the email is from the same domain
    //as your website to avoid being marked as spam.
    return 'webmaster@mydomainname.com';
    }


    add_filter( 'wp_mail_from_name', 'example_wp_mail_from_name' );
    function example_wp_mail_from_name( $original_email_from ) {
    return 'My Awesome Website';
    }

    Both these snippets should be placed in the functions.php file of your active theme. Also, don’t forget to use your email address and the preferred name you like to appear in your outgoing emails.

    Kind regards,
    George

Share