Skip to:
Content
Pages
Categories
Search
Top
Bottom

modify the email sent by the sistem “wordpress@mydomain.com”


  • ico33
    Participant

    @ico33

    Hello, I was looking how to change the email address from which are sent the emails from buddypress to the users. When a user receives an email from buddypress it looks like this

    wordpress@mydomain.com

    How to change the word “wordpress” in “info”?

    I found online a topic that has over 2 years. There is the suggestion to add in theme’s function.php this code

    function custom_wp_mail_from( $email ) {
            $handle = 'info';
    	$find = 'http://'; 
    	$replace = '';
    	$link = get_bloginfo( 'url' );
    	$domain = str_replace( $find, $replace, $link );
    	return $handle . '@' . $domain ;
    }
    add_filter( 'wp_mail_from', 'custom_wp_mail_from' );

    Can you confirm this is the best solution to do it?

    Thanks you!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar