diff --git a/include/class.ticket.php b/include/class.ticket.php index aac5be02ae07e4fa723f5046d9dcf144135f64d5..604ead02f070d545bea570b5e7e11c958b895223 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -2944,9 +2944,8 @@ implements RestrictedAccess, Threadable, Searchable { $collabsCc['cc'] = $collabsCc[0]; } - if (Ticket::checkReply('user', $vars['emailreply'])) - $email->send($user, $msg['subj'], $msg['body'], $attachments, - $options, $collabsCc); + $email->send($user, $msg['subj'], $msg['body'], $attachments, + $options, $collabsCc); } @@ -4046,8 +4045,7 @@ implements RestrictedAccess, Threadable, Searchable { $vars['response'] = $ticket->replaceVars($vars['response']); // $vars['cannedatachments'] contains the attachments placed on // the response form. - $response = $ticket->postReply($vars, $errors, - !isset($vars['alertuser'])); + $response = $ticket->postReply($vars, $errors, is_null($vars['emailreply']) ?: !isset($vars['emailreply'])); } // Not assigned...save optional note if any @@ -4059,6 +4057,7 @@ implements RestrictedAccess, Threadable, Searchable { } if (!$cfg->notifyONNewStaffTicket() + || !isset($vars['emailreply']) || !($dept=$ticket->getDept()) ) { return $ticket; //No alerts.