• Resolved cp0966

    (@cp0966)


    I’ve a requirement to send email to specific user role and also need to send same email cc-ing post author. Currently it is not achievable with Notification setting and also no filter is available to modify cc, bcc headers.

    NOTE: There is filter available bnfw_mail_headers but this is not taking enough arguments like $setting, $post_id which are necessary to achieve my requirement.

    • This topic was modified 11 months, 3 weeks ago by cp0966.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bnfw

    (@voltronik)

    Hi @cp0966,
    Thanks for your message.

    It depends if the notification that BNFW overrides has the ability to filter the CC or BCC fields in the first instance. Not all filters or hooks within WordPress allow this which is why, as a result, BNFW doens’t allow this either.
    If the options aren’t available within BNFW by default then it most likely isn’t possible so you may need to write your own custom code to send a notification when you need it to and amalgamate the user role and author in to the ‘to’ field, if possible.

    Sorry I can’t help more.

    Thread Starter cp0966

    (@cp0966)

    Hi @bnfw

    Adding following filter in BNFW_Engine class > get_emails() function at Line #1200 can help to achieve this.

    $emails[‘cc’] = apply_filters( ‘bnfw_cc_emails’, $emails[‘cc’], $setting, $id );

    Thanks you

    • This reply was modified 11 months, 1 week ago by cp0966.
    • This reply was modified 11 months, 1 week ago by cp0966.
    Plugin Author bnfw

    (@voltronik)

    Hi @cp0966,
    Glad you got it working.
    Please note that you’ll need to re-add any changes you make to the BNFW plugin directly after any plugin updates.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add filter to modify cc, bcc headers’ is closed to new replies.