Is a bit ugly but it work.I've created a custom field (required) in the new ticket cusom form named "CC Email".I've done a bit of reverse engeneering on the database and I noticed that the CC emails entries are stored in "form_entry_values".Practically I added a query for that data at the beginning of "onNewTicket" function ( \include\class.ticket.php):- I select the last entry of that db table where "field_id" is equal to the "CC Email" field id in the table "form_entry_values" - I match the email with the existing emails (make sure to not create two identical users), if it already exist I create a new collaborator associated to this ticket with user_id (matched with the emil in the users table), if it not exist I create a new user with that email and I create a collaborator with his id- When collaborators are added I notify the creation of the ticket to customer and collaboratorsLet me attach some code to be more clear.//----------------------------------------------------- $sql= "SELECT value,entry_id FROM ost_form_entry_values WHERE field_id='50' OR field_id='51' OR field_id='40' ORDER BY entry_id DESC LIMIT 1;"; //select CC email $risul= db_query($sql); $emailrif = db_fetch_row($risul); //extract CC email unset($risul); $sql= "SELECT user_id FROM ost_user_email WHERE address='$emailrif'"; //already exist? $risul= db_query($sql); $idesist=db_fetch_row($risul); if (isset($idesist)) //if exist { if($idesist !== $this->getUserId())//la mail è uguale a quella del cliente? { $sql= "SELECT id FROM ost_ticket_collaborator ORDER BY id DESC LIMIT 1;";//seleziono ultimo id collaboratore $risul= db_query($sql); $icoll = db_fetch_row($risul); $icoll+=1; $idchiam= $this->getId(); $sql="INSERT INTO ost_ticket_collaborator (id,isactive,ticket_id,user_id,role) VALUES ('$icoll','1','$idchiam','$idesist','M')"; db_query($sql);//creo collaboratore con id user che esiste già } } else //not exist { $sql= "SELECT id FROM ost_user ORDER BY id DESC LIMIT 1;";//seleziono ultimo id user $risul= db_query($sql); $iduser = db_fetch_row($risul); $iduser+=1; $sql= "SELECT value,entry_id FROM ost_form_entry_values WHERE field_id='42' OR field_id='46' OR field_id='39' ORDER BY entry_id DESC LIMIT 1;";//seleziono persona rif $risul= db_query($sql); $persona = db_fetch_row($risul);//estraggo persona rif $sql= "INSERT INTO ost_user (id,org_id,status,name) VALUES ('$iduser','0','0','$persona');";//creo user db_query($sql); //------------------------------ $sql= "INSERT INTO ost_user_email (id,user_id,address) VALUES ('$iduser','$iduser','$emailrif');";//creo email db_query($sql); $sql= "UPDATE ost_user SET default_email_id='$iduser' WHERE id='$iduser';"; db_query($sql); //creo collaborator $sql= "SELECT id FROM ost_ticket_collaborator ORDER BY id DESC LIMIT 1;";//seleziono ultimo id collaboratore $risul= db_query($sql); $icoll = db_fetch_row($risul); $icoll+=1; $idchiam= $this->getId(); $sql="INSERT INTO ost_ticket_collaborator (id,isactive,ticket_id,user_id,role) VALUES ('$icoll','1','$idchiam','$iduser','M')";//creo collaboratore con utente appena creato db_query($sql); }if($autorespond && $cfg->autoRespONNewTicket() && $dept->autoRespONNewTicket() && ($msg=$tpl->getAutoRespMsgTemplate())) { $msg = $this->replaceVars($msg->asArray(), array('message' => $message, 'recipient' => $this->getOwner(), 'signature' => ($dept && $dept->isPublic())?$dept->getSignature():'') ); $email->sendAutoReply($this->getOwner(), $msg, $msg, null, $options); $sql="SELECT address ". "FROM ost_user_email, ost_ticket_collaborator ". "WHERE ost_user_email.id = ost_ticket_collaborator.user_id ". "AND ost_ticket_collaborator.ticket_id = '$idchiam';"; $risul= db_query($sql); $collabor = db_fetch_row($risul); foreach ($collabor as $dest) $email->sendAutoReply($dest, $msg, $msg, null, $options); }