I'm still new to this but I'll give it a go.
Looking at the code it appears the new ticket goes through class.ticket create
So at this line of code
//Load newly created ticket.
$ticket = new Ticket($id);
$ticket points to the new record
$ticket->getHelpTopic() and $ticket->getSubject() will give you two of your variables. It looks like $var contains the body text
So somewhere near
//SEND OUT NEW TICKET AUTORESP && ALERTS.
//New Ticket AutoResponse..
you would need to built your email text. I think this should do it but I've not tested any of this.
$email="email to send to";
$body="body";
$subj="subject here";
$email=$cfg->getDefaultEmail();
if($email){
$email->send($email,$subj,$body);
}
Regards
G