Skip to content
Browse files

Merge pull request #77 from protich/feature/reply_email

Bug/reply email
  • Loading branch information...
2 parents e35d545 + 3dcf9a8 commit 7708707b20ca319bd57eb451861aa3e61ebad804 @protich committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 include/class.ticket.php
View
7 include/class.ticket.php
@@ -1415,16 +1415,17 @@ function postReply($vars, $files, $errors, $alert = true) {
$this->onResponse(); //do house cleaning..
$this->reload();
- $dept = $this->getDept();
/* email the user?? - if disabled - the bail out */
if(!$alert) return $respId;
+ $dept = $this->getDept();
+
if(!($tpl = $dept->getTemplate()))
$tpl= $cfg->getDefaultTemplate();
- if(!($email=$cfg->getAlertEmail()))
- $email =$cfg->getDefaultEmail();
+ if(!$dept || !($email=$dept->getEmail()))
+ $email = $cfg->getDefaultEmail();
if($tpl && ($msg=$tpl->getReplyMsgTemplate()) && $email) {
$body=$this->replaceTemplateVars($msg['body']);

0 comments on commit 7708707

Please sign in to comment.
Something went wrong with that request. Please try again.