Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change Email default WordPress


  • Dannypid1
    Participant

    @dannypid1

    Hi,

    The latest update of Buddypress to broken code change my default email.

    I had this code working:

    add_filter('wp_mail_from', 'new_mail_from');
    add_filter('wp_mail_from_name', 'new_mail_from_name');
     
    function new_mail_from($old) {
     return 'noreply@your-web.com';
    }
    function new_mail_from_name($old) {
     return 'your-web.Com';
    }
    

    Now it does not work. Not professional WordPress appear in the sender when user want to reset password.

    Who can help me?
    I need to delete emails WordPress

    Thanks !

Viewing 2 replies - 1 through 2 (of 2 total)

  • shanebp
    Moderator

    @shanebp

    For BP 2.5+, a different hook is used.
    Try:

    function danny_set_email( $email_type, $email_obj ) { 
        $email_obj->set_from( "noreply@your-web.com", "your-web.Com" ); 
    }
    add_action( 'bp_email', 'danny_set_email', 10, 2 );

    Dannypid1
    Participant

    @dannypid1

    It doesn’t work

    wordpress 4.4.2 And Buddypress 2.5.1

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