Viewing 5 replies - 1 through 5 (of 5 total)
  • Is it possible that something is filtering wp_mail_from? By default registration notifications should come from an email address that starts with wordpress@.

    Konstantin

    Here’s a really simple piece of code to change the default from email address for functions.php

    function filter_wp_mail_from($email){
        return "[email protected]";
    }
    add_filter("wp_mail_from", "filter_wp_mail_from");
    Thread Starter Deepak Bagwari

    (@bagwari)

    @shannon

    i have added above in funtions.php, defualt from email address now working fine . thank for help.
    but i want to also change reply-to: email address
    reply-to: email address still showing with [email protected] in email Header.
    please help with the same.

    i have the same problem, “reply to” email in my case go to [email protected]
    how to solve?

    This should fix it.

    <?php
    // Set Sender (Return Path) to From address
    if ( ! function_exists( 'edl_setemailsender' ) ) {
    	add_action('phpmailer_init', 'edl_setemailsender');
    	function edl_setemailsender($params) {
    		if(filter_var($params->Sender, FILTER_VALIDATE_EMAIL) !== true) {
    			$params->Sender = $params->From;
    		}
    	}
    }
    ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP default email address showing with [email protected]’ is closed to new replies.