Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to properly set bcc in all emails?


  • kmligue
    Participant

    @kmligue

    I use the filter ‘bp_email_set_bcc’ to set the bcc of all emails in bp. This is the custom code:

    function site_bp_email_set_bcc($bcc) {
    $bcc = new BP_Email_Recipient( ‘myemail@gmail.com’ );

    return $bcc;
    }
    add_filter(‘bp_email_set_bcc’, ‘site_bp_email_set_bcc’);

    It didn’t work. I guess the error is in the instantiation of BP_Email_Recipient?

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

  • Henry Wright
    Moderator

    @henrywright

    Try changing this

    $bcc = new BP_Email_Recipient( 'myemail@gmail.com' );

    to

    $bcc[] = new BP_Email_Recipient( 'myemail@gmail.com' );

    Yes, ^ that should work.


    kmligue
    Participant

    @kmligue

    Still the same. The actual recipient got the email but in the bcc nothing. Btw, i put that code in bp-custom.php


    Henry Wright
    Moderator

    @henrywright

    bcc stands for blind carbon copy. It’s a way of sending email to a group of recipients without them seeing who else the email is addressed to. So bcc will be blank every time.

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