OK, so HostGator is blocking the outgoing message, which means you need to change the SMTP settings to use their SMTP server, or to use PHP's mail function.
However, that doesn't explain why you are getting the new ticket instead of having the reply added to the ticket...
I have been using piping, so I am not sure that I can help too much... I've had a look at class.mailfetch.php, and it seems that it has come code that is similar to pipe.php - the part that detects mismatched emails. What I did was change it so that it will allow ANY staff email address to post a response:
In include/class.mailfetch.php, find //Allow mismatched emails?? For now NO.
if(!$ticket || strcasecmp($ticket->getEmail(),$var))
$ticket=null;
Replace it with:
//Allow mismatched emails?? For now hell NO.
if(!is_object($ticket) || strcasecmp($ticket->getEmail(),$var)) {
//$ticket=null;
}
}
// mod to allow staff to reply via email
// check that email address is in the staff list.
$sql="SELECT username FROM " . STAFF_TABLE . " WHERE email='" . $var . "' ";
$query=db_query($sql);
while($row = mysql_fetch_array($query)) {
$senderUsername = $row;
}
// if username is in the staff list, then it can be a reply
// if username is not in the staff list, then it must be a new ticket
if (!$senderUsername){
$ticket=null;
}
// end mod
That worked for me, however I have not tested it with POP - I don't see why it would not work... Let me know!