Skip to content
Snippets Groups Projects
Commit 7708707b authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #77 from protich/feature/reply_email

Bug/reply email
parents e35d5452 3dcf9a81
No related branches found
No related tags found
No related merge requests found
...@@ -1415,16 +1415,17 @@ class Ticket{ ...@@ -1415,16 +1415,17 @@ class Ticket{
$this->onResponse(); //do house cleaning.. $this->onResponse(); //do house cleaning..
$this->reload(); $this->reload();
$dept = $this->getDept();
/* email the user?? - if disabled - the bail out */ /* email the user?? - if disabled - the bail out */
if(!$alert) return $respId; if(!$alert) return $respId;
$dept = $this->getDept();
if(!($tpl = $dept->getTemplate())) if(!($tpl = $dept->getTemplate()))
$tpl= $cfg->getDefaultTemplate(); $tpl= $cfg->getDefaultTemplate();
if(!($email=$cfg->getAlertEmail())) if(!$dept || !($email=$dept->getEmail()))
$email =$cfg->getDefaultEmail(); $email = $cfg->getDefaultEmail();
if($tpl && ($msg=$tpl->getReplyMsgTemplate()) && $email) { if($tpl && ($msg=$tpl->getReplyMsgTemplate()) && $email) {
$body=$this->replaceTemplateVars($msg['body']); $body=$this->replaceTemplateVars($msg['body']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment