Here is some debuggging code i added
The WEIRD part is, if i send mail from the command line, sometimes I see
11, and sometimes I see both 11 and 12, without changing anything in settings or code. Which only makes me thing fopen or fwrite is foiling me, but that sounds very strange.
$fh = fopen('/tmp/x_jeff', 'w') ; fwrite($fh,"11 - DEBUG\n"); fclose($fh);
//Staff members
if($cfg->alertDeptMembersONNewTicket()) {
$fh = fopen('/tmp/x_jeff', 'w') ; fwrite($fh,"12 - DEBUG\n"); fclose($fh);
$sql='SELECT staff_id FROM '.STAFF_TABLE.' WHERE onvacation=0 AND dept_id='.db_input($dept->getDeptId());
if(($users=db_query($sql)) && db_num_rows($users)) {
while(list($id)=db_fetch_row($users))
$recipients= new Staff($id);
}
$fh = fopen('/tmp/x_jeff', 'w') ; fwrite($fh,"14 - DEBUG\n"); fclose($fh);
}
$fh = fopen('/tmp/x_jeff', 'w') ; fwrite($fh,"15 - DEBUG\n"); fclose($fh);