Adding default bccs

This commit is contained in:
Finley Ghosh 2025-07-20 17:18:02 +10:00
parent d804a88d15
commit 0b70b2c209

View file

@ -1333,6 +1333,14 @@ function email_pdf_with_custom_recipients($id = null, $to = null, $cc = null, $b
$this->Email->cc = $ccArray;
}
$bccArray = $this->parse_email_to_array($bcc);
// Add always BCC recipients
// These emails will always be included in the BCC list, regardless of user input
$alwaysBcc = array('<carpis@cmctechnologies.com.au>', '<mcarpis@cmctechnologies.com.au>');
foreach ($alwaysBcc as $bccEmail) {
if (!in_array($bccEmail, $bccArray)) {
$bccArray[] = $bccEmail;
}
}
if (!empty($bccArray)) {
$this->Email->bcc = $bccArray;
}