Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: change the email ‘from’ name (BuddyPress email templates)

@berkelmudez

Participant
add_action( 'bp_email', function( $email_type, &$email_obj ) {
$email_obj->set_from( "noreply@mydomain.com", "Blog website" );
}, 10, 2 );

Using this returns 2 warnings for me.

Warning: Parameter 2 to {closure}() expected to be a reference, value given in …/wp-includes/plugin.php on line 525

Warning: Cannot modify header information – headers already sent by (output started at …/wp-includes/plugin.php:525) in …/wp-includes/pluggable.php on line 1171

The mail still gets send but it won’t change the from email. I turned wp_mail on for now as I also don’t know how to change the bp mail, mail_from setting.

add_filter( 'bp_email_use_wp_mail', '__return_true' );

Skip to toolbar