Skip to:
Content
Pages
Categories
Search
Top
Bottom

“From” email change only partially working


  • mvandemar
    Participant

    @mvandemar

    So following the steps in this post:

    change the email ‘from’ name (BuddyPress email templates)

    I used this code:

    add_action( 'bp_email', function( $email_type, $email_obj ) {
    	$email_obj->set_reply_to( "wordpress@mydomain.com", "My Site" );
    }, 10, 2 );
    
    add_action( 'bp_email', function( $email_type, $email_obj ) {
    	$email_obj->set_from( "wordpress@mydomain.com", "My Site" );
    }, 10, 2 );

    This partially worked. The signup emails going to the registrant now have the correct From address, but the notifications going to the admin have the WordPress administrator email listed as the From. I believe this is an issue because both the to and from are now a Gmail address, ie. To: myclient@gmail.com and From: myclient@gmail.com, and Gmail is kicking them back as untrusted. How do I get it to change the From email in all cases? Note that I am using the Buddyboss theme, if that makes a difference. Since the above code isn’t checking for the value of $email_type I would have thought it would just work on all of the emails, but the code is also 3 years old so guessing some things may have changed.

    Edit: Also, will Buddypress play well with plugins that allow you to send authenticated emails via SMTP or IMAP, such as WP Mail SMTP by WPForms? I feel that might alleviate the issues we are having but it would be good to know if there’s anything special we need to do before going down that road, thanks.

    -Michael

  • You must be logged in to reply to this topic.
Skip to toolbar