Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/include/class.ticket.php b/include/class.ticket.php
- index 2619c62..3f55cf9 100644
- --- a/include/class.ticket.php
- +++ b/include/class.ticket.php
- @@ -1000,6 +1000,7 @@ class Ticket {
- && ($msg=$tpl->getNewTicketAlertMsgTemplate())) {
- $msg = $this->replaceVars($msg->asArray(), array('message' => $message));
- + $attachments = $cfg->emailAttachments()?$message->getAttachments():array();
- $recipients=$sentlist=array();
- //Exclude the auto responding email just incase it's from staff member.
- @@ -1009,7 +1010,7 @@ class Ticket {
- //Alert admin??
- if($cfg->alertAdminONNewTicket()) {
- $alert = $this->replaceVars($msg, array('recipient' => 'Admin'));
- - $email->sendAlert($cfg->getAdminEmail(), $alert['subj'], $alert['body'], null, $options);
- + $email->sendAlert($cfg->getAdminEmail(), $alert['subj'], $alert['body'], $attachments, $options);
- $sentlist[]=$cfg->getAdminEmail();
- }
- @@ -1035,7 +1036,7 @@ class Ticket {
- foreach( $recipients as $k=>$staff) {
- if(!is_object($staff) || !$staff->isAvailable() || in_array($staff->getEmail(), $sentlist)) continue;
- $alert = $this->replaceVars($msg, array('recipient' => $staff));
- - $email->sendAlert($staff, $alert['subj'], $alert['body'], null, $options);
- + $email->sendAlert($staff, $alert['subj'], $alert['body'], $attachments, $options);
- $sentlist[] = $staff->getEmail();
- }
- }
- @@ -1741,10 +1745,11 @@ class Ticket {
- }
- $sentlist=array(); //I know it sucks...but..it works.
- + $attachments = $cfg->emailAttachments()?$message->getAttachments():array();
- foreach( $recipients as $k=>$staff) {
- if(!$staff || !$staff->getEmail() || !$staff->isAvailable() || in_array($staff->getEmail(), $sentlist)) continue;
- $alert = $this->replaceVars($msg, array('recipient' => $staff));
- - $email->sendAlert($staff, $alert['subj'], $alert['body'], null, $options);
- + $email->sendAlert($staff, $alert['subj'], $alert['body'], $attachments, $options);
- $sentlist[] = $staff->getEmail();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement