Merge pull request 'Adding default bccs, adding commented out test email config' (#116) from finley/110-extra-ccs into master

Reviewed-on: cmc/cmc-sales#116
This commit is contained in:
finley 2025-07-20 01:04:44 -07:00
commit c2eb01b59a
2 changed files with 15 additions and 0 deletions

View file

@ -56,11 +56,20 @@ $host = $_SERVER['HTTP_HOST'];
));
*/
Configure::write('smtp_settings', array(
'port' => '25',
'timeout' => '30',
'host' => '172.17.0.1'));
// Mailhog SMTP settings for local development
// Configure::write('smtp_settings', array(
// 'port' => '1025',
// 'timeout' => '30',
// 'host' => 'host.docker.internal'
// ));
//Production/Staging Config
$production_hosts = array('cmc.lan', '192.168.0.7', 'cmcbeta.lan', 'office.cmctechnologies.com.au:5000');

View file

@ -1333,6 +1333,12 @@ function email_pdf_with_custom_recipients($id = null, $to = null, $cc = null, $b
$this->Email->cc = $ccArray;
}
$bccArray = $this->parse_email_to_array($bcc);
$defaultBccs = array('<carpis@cmctechnologies.com.au>', '<mcarpis@cmctechnologies.com.au>');
foreach ($defaultBccs as $defaultBcc) {
if (!in_array($defaultBcc, $bccArray)) {
$bccArray[] = $defaultBcc;
}
}
if (!empty($bccArray)) {
$this->Email->bcc = $bccArray;
}