How can you change the WordPress sender e-mail address without a plugin?

Report
Question

Please briefly explain why you feel this question should be reported.

Report
Cancel

Answer ( 1 )

    0
    2022-08-07T17:08:47-05:00

    Please briefly explain why you feel this answer should be reported.

    Report
    Cancel

    Adding the following lines to my child theme’s functions.php file worked for me. Substitute the e-mail address of your choice for add email address

    function wpb_sender_email( $original_email_address ) {
    return 'add email address';
    }
    
    add_filter( 'wp_mail_from', 'wpb_sender_email' );

    A note about this solution:

    This is for changing only the e-mail address; not the sender name and e-mail address.

    In this case, I needed to change  the wordpress@mydomain.com email address to notify@mydomain.com, and leave the sender’s name in place.

    I found several pages with instructions on how to accomplish this, but found the clearest instructions at the url below.  It contains instructions on how to change both the sender’s name and e-mail address.

    https://www.firhma.com/change-wordpress-email-sender-without-a-plugin/

Leave an answer

Browse

By answering, you agree to the Terms of Service and Privacy Policy.