Hi, Currently I am using osTicket version 1.9.7. I would like to have a feature where I can automatically close the ticket by replying on the email. I tried to close the ticket by adding #close in the email subject. So, when the system detects there is #close in the email subject, it will automatically close the ticket. However, I can't get the result that I want. The system creates a new ticket for every time I add #close in the email subject. Could anyone guide me on this? Any help would be greatly appreciated. I follow the link that is posted previously.These are the files that I have changed./include/class.mailfetch.php.....// Allow signal handlers to interact with the message decodingif($ticket) { $staffsql = 'SELECT staff_id, firstname, lastname, email FROM '.STAFF_TABLE.' WHERE email='.db_input($vars).' LIMIT 1'; $vars = $vars; if(($staffres=db_query($staffsql)) && (db_num_rows($staffres) == 0)){ if(!($message=$ticket->postMessage($vars, 'Email'))) return false; } else { $staffvars=db_fetch_row(db_query($staffsql)); $replyvars=Array( "msgId" => $ticket, "response" => $vars, "poster" => $staffvars.' '.$staffvars, "staffId" => $staffvars, "subject" => $vars, ); $errors=array(); if(!($msgid=$ticket->postReply($replyvars, $errors))) return false; }} ..../include/class.ticket.php ... /* public */ function postReply($vars, &$errors, $alert = true) {//Check for actions in the subject if($vars && preg_match ("/#close/", $vars, $action)) { return $this->setStatus(3); } ...