Is it possible to automatically add a bcc in all tickets so that the mail also arrives in one central mailbox? The bcc address is always the same
BCC in alle tickets
You would have to alter the core files to achieve this.
My guess would be /include/class.email.php
The right file is class.mailer.php i think. I dont have PHP knowledge so any help will be Appreciated
Is is indeed possible (however not in invisible bcc) to add in class.mailer.php
$mime->addBCC('example@example.com');
But this results that the receiver does also see the BCC field somehow? Anyone help?
For us it a second question that the e-mail is not a fixed e-mail but depending on the department. How can I get the department ID in the class.mailer.php?
something like:
if ( $dept = "department_sales")
{$bccmail = sales_bcc@example.com ;}
elseif ( $dept = "department_support")
{$bccmail = support_bcc@example.com;}
else
{$bccmail = info_bcc@example.com;}
$mime->addBCC($bccmail);
How to get the $dept ?
You can try $ticket->getDeptName()
Just use the PHP function mail: https://www.php.net/manual/en/function.mail.php. This has a Bcc function.
$headers[] = 'Bcc: birthdaycheck@example.com';
To get the right department and send to the bcc of the thatI used:
$department_loc = $this->getFromAddress($options) ;
if ( (strpos($department_loc, 'service') !== false) )
{$deptmail_bcc = "service_bcc@company.com" ; }
elseif ( (strpos($department_loc, 'sales') !== false) )
{$deptmail_bcc = "sales_bcc@company.com" ; }
elseif ( (strpos($department_loc, 'info') !== false) )
{$deptmail_bcc = "info_bcc@company.com" ; }
..
..
..
else
{$deptmail_bcc = "unkown@company.com" ; }
$mime->addBcc($deptmail);