I have this as example entered in the field (Send notification to specific email address).
person1@sample.org , bcc:person2@gmail.com, person3@gmail.com
All 3 people get the email, but the last two should be BCC so that the first person doesn't see them on the to line.
What am I doing wrong
Mateus Getulio
Supporter
Idiomas:
Inglés (English )
Zona horaria:
America/Sao_Paulo (GMT-03:00)
Hey there,
Thank you for contacting our support.
You need to use a hook, cred_notification_recipients, to include the BCC addresses.
More info on about the hook is available here: https://toolset.com/documentation/programmer-reference/cred-api/#cred_notification_recipients .
Please check the example:
/**
* Customize CRED notification recipients by adding a BCC
* to the the notification "Content submitted"
*/
add_filter('cred_notification_recipients', 'modify_recipients', 10, 4);
function modify_recipients($recipients, $notification, $form_id, $post_id) {
// Check notification name matches target notification
if ( isset($notification['name']) && 'Content submitted' == $notification['name'] ) {
// Add a BCC to person3@gmail.com
$recipients[] = array(
'to' => 'bcc',
'address' => 'person3@gmail.com',
'name' => '',
'lastname' => ''
);
}
return $recipients;
}
Here are a few other similar examples for you to base on:
https://toolset.com/forums/topic/syntax-for-notification-email-to-bcc/page/2/#post-2498081
https://toolset.com/forums/topic/ive-got-to-go-to-sleep-but-need-someone-to-work-on-existing-tickets/#post-1871519
Please give it a try and tell us the results.
Best regards,
Mateus
I didn't have a chance to review or implement this solution.