My client is using an external CRM called lessannoyingcrm.com which works by sending it an email and through the incoming email it creates a workflow.I need to edit Osticket so that each time a ticket is replied to, or an internal note is added osticket will send a BCC to a fixed email address (which gets sent to lessannoyingcrm.com)I dont need to display or give the ticket updater access to edit or view the BCC email address so I am guessing I simply need to go into one of the class files and add something like this...$Bcc = "myaccount@lessannoyingcrm.com";I just dont know exactly where to hard code that.Appreciate any guidance on this.Thanks.

Take a look at this discussion: http://forum.osticket.com/d/discussion//smtp-outgoing-mail-not-in-sent-items#latest

Hi;I have tried this in /include/class.mailer.php ...but not receiving the Bcc to the crm.//do some cleanup        $to = preg_replace("/(\r\n|\r|\n)/s",'', trim($to));        $subject = preg_replace("/(\r\n|\r|\n)/s",'', trim($subject));        $bcc = "craig@lessannoyingcrm.com";        $headers = array (            'Bcc' => $bcc,            'From' => $this->getFromAddress(),            'To' => $to,            'Subject' => $subject,            'Date'=> date('D, d M Y H O'),            'Message-ID' => $messageId,            'X-Mailer' =>'osTicket Mailer',        );

Hmmm, haven't any other idea / an own idea since I'm not so deep into the osTicket code.But for testing you could set up a second osTicket (instead of trying at the productive environment) and try what happens if you for example modify the 'TO' and include $bcc there or add a normal CC to the headers array or if it's possible to add an email function which sends all mails to the crm too (instead of BCC).

5 days later

Ok I figured out a workaround.

Inside of /includes/class.mailer.php, towards the top of the send() function I added the following code between //do some cleanup and $headers = array(.

This is the edits made to class.mailer.php

blank

This is the contents of send-email-copy-to-less-annoying-crm.php

blank

Great!

Really appreciate that you shared the solution with us here too.

Closing this discussion and marking it as resolved. Feel free to open a new thread for another issue, comment or question.

Write a Reply...