From 4546dc916f3ff6451f49cb78ed05321b187101e2 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Tue, 4 Dec 2012 13:54:50 -0500 Subject: [PATCH] Add wrappers for bulk/auto_reply emails --- include/class.email.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/class.email.php b/include/class.email.php index e6b10c389..c38144c4b 100644 --- a/include/class.email.php +++ b/include/class.email.php @@ -142,7 +142,6 @@ class Email { function send($to, $subject, $message, $attachments=null, $options=null) { - $mailer = new Mailer($this); if($attachments) $mailer->addAttachments($attachments); @@ -150,6 +149,16 @@ class Email { return $mailer->send($to, $subject, $message, $options); } + function sendAutoReply($to, $subject, $message, $attachments=null, $options=array()) { + $options+= array('autoreply' => true); + return $this->send($to, $subject, $message, $attachments, $options); + } + + function sendAlert($to, $subject, $message, $attachments=null, $options=array()) { + $options+= array('bulk' => true); + return $this->send($to, $subject, $message, $attachments, $options); + } + function update($vars,&$errors) { $vars=$vars; $vars['cpasswd']=$this->getPasswd(); //Current decrypted password. -- GitLab