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

You would have to alter the core files to achieve this.

    ntozier thank you for your reaction. Do you know which file(s) I need to change?

    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 ?

      5 days later

      You can try $ticket->getDeptName()

      23 days later

      bepage Is there somebody who can help to prevent the bcc from being visible in the mail to be answered ?

      8 days later

      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);

      4 years later

      PavelH this solution works also on osticket v1.18 (724de45), PHP 8.1.20, Email agent PHP.

      Sorry for necroposting but I searched a solution in the forum for my osticket version without a good result, maybe this can help someone.

      Write a Reply...