当前位置: 首页>>代码示例>>PHP>>正文


PHP Shineisp_Commons_Utilities::sendEmailTemplate方法代码示例

本文整理汇总了PHP中Shineisp_Commons_Utilities::sendEmailTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP Shineisp_Commons_Utilities::sendEmailTemplate方法的具体用法?PHP Shineisp_Commons_Utilities::sendEmailTemplate怎么用?PHP Shineisp_Commons_Utilities::sendEmailTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shineisp_Commons_Utilities的用法示例。


在下文中一共展示了Shineisp_Commons_Utilities::sendEmailTemplate方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processAction

 public function processAction()
 {
     $ns = new Zend_Session_Namespace("default");
     $request = $this->getRequest();
     $form = new Default_Form_ContactsForm(array('action' => '/contacts/process', 'method' => 'post'));
     $this->view->form = $form;
     // Check if we have a POST request
     if (!$request->isPost()) {
         return $this->_helper->redirector('index', 'contacts', 'default');
     }
     if ($form->isValid($request->getPost())) {
         // Get the values posted
         $params = $form->getValues();
         $captcha = $params['captcha'];
         // Actually it's an array, so both the ID and the submitted word
         // is in it with the corresponding keys
         // So here's the ID...
         $captchaId = $captcha['id'];
         // And here's the user submitted word...
         $captchaInput = $captcha['input'];
         // We are accessing the session with the corresponding namespace
         // Try overwriting this, hah!
         $captchaSession = new Zend_Session_Namespace('Zend_Form_Captcha_' . $captchaId);
         // To access what's inside the session, we need the Iterator
         // So we get one...
         $captchaIterator = $captchaSession->getIterator();
         // And here's the correct word which is on the image...
         $captchaWord = $captchaIterator['word'];
         // Now just compare them...
         if ($captchaInput == $captchaWord) {
             $isp = Shineisp_Registry::get('ISP');
             Shineisp_Commons_Utilities::sendEmailTemplate($isp->email, 'contact', array('fullname' => $params['fullname'], 'company' => $params['company'], 'email' => $params['email'], 'subject' => $params['subject'], 'message' => $params['message']), null, null, null, null, $ns->langid);
             // Redirect the visitor to the contact page
             return $this->_helper->redirector('index', 'contacts', 'default', array('mex' => 'The task requested has been executed successfully.', 'status' => 'success'));
         }
     }
     return $this->_helper->viewRenderer('index');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:38,代码来源:ContactsController.php

示例2: saveData

 /**
  * saveData
  * Save the record
  * @param posted var from the form
  * @return Boolean
  */
 public static function saveData($record, $sendemail = false)
 {
     // Set the new values
     if (!empty($record['review_id']) && is_numeric($record['review_id'])) {
         $review = self::getbyId($record['review_id']);
     } else {
         $review = new Reviews();
         $review->ip = $_SERVER['REMOTE_ADDR'];
     }
     // Get the latitude and longitude coordinates
     $coords = Shineisp_Commons_Utilities::getCoordinates($record['city']);
     $review->product_id = $record['product_id'];
     $review->publishedat = date('Y-m-d H:i:s');
     $review->nick = $record['nick'];
     $review->city = !empty($coords['results'][0]['formatted_address']) ? $coords['results'][0]['formatted_address'] : $record['city'];
     $review->referer = $record['referer'];
     $review->subject = $record['subject'];
     $review->latitude = !empty($coords['results'][0]['geometry']['location']['lat']) ? $coords['results'][0]['geometry']['location']['lat'] : $record['latitude'];
     $review->longitude = !empty($coords['results'][0]['geometry']['location']['lng']) ? $coords['results'][0]['geometry']['location']['lng'] : $record['longitude'];
     $review->email = $record['email'];
     $review->stars = $record['stars'];
     $review->active = isset($record['active']) ? $record['active'] : 0;
     $review->review = $record['review'];
     if ($review->trySave()) {
         if ($sendemail) {
             // Send the email to confirm the subscription
             $isp = Isp::getActiveISP();
             $placeholders['review'] = $record['review'];
             $placeholders['nick'] = $record['nick'];
             $placeholders['referer'] = $record['referer'];
             $placeholders['subject'] = $record['subject'];
             $placeholders['email'] = $record['email'];
             $placeholders['stars'] = $record['stars'];
             $placeholders['product'] = products::getAllInfo($record['product_id']);
             // Send a message to the administrator
             Shineisp_Commons_Utilities::sendEmailTemplate($isp['email'], 'review_new', $placeholders);
         }
         return $review->review_id;
     }
     return false;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:47,代码来源:Reviews.php

示例3: sendOrder

 public static function sendOrder($orderid, $customURL = null)
 {
     $bank = "";
     if (is_numeric($orderid)) {
         $order = self::getAllInfo($orderid, null, true);
         //if customer comes from reseller
         if ($order[0]['Customers']['parent_id']) {
             $customer_email = Contacts::getEmails($order[0]['Customers']['parent_id']);
             $invoice_dest = Customers::getAllInfo($order[0]['Customers']['parent_id']);
             $customer = $invoice_dest['firstname'] . " " . $invoice_dest['lastname'];
             $customer .= !empty($invoice_dest['company']) ? " - " . $invoice_dest['company'] : "";
             $fastlink = Fastlinks::findlinks($orderid, $order[0]['Customers']['parent_id'], 'orders');
             $language_id = $invoice_dest['language_id'];
         } else {
             $customer_email = Contacts::getEmails($order[0]['Customers']['customer_id']);
             $customer = $order[0]['Customers']['firstname'] . " " . $order[0]['Customers']['lastname'];
             $customer .= !empty($order[0]['Customers']['company']) ? " - " . $order[0]['Customers']['company'] : "";
             $fastlink = Fastlinks::findlinks($orderid, $order[0]['Customers']['customer_id'], 'orders');
             $language_id = $order[0]['Customers']['language_id'];
         }
         $email = $order[0]['Isp']['email'];
         $bankInfo = Banks::getBankInfo();
         if (!empty($bankInfo['description'])) {
             $bank = $bankInfo['description'];
         }
         if (!empty($customURL)) {
             $url = $customURL;
         } else {
             if (!empty($fastlink[0]['code'])) {
                 $url = "http://" . $_SERVER['HTTP_HOST'] . "/index/link/id/" . $fastlink[0]['code'];
             } else {
                 $url = "http://" . $_SERVER['HTTP_HOST'];
             }
         }
         $date = explode("-", $order[0]['order_date']);
         Shineisp_Commons_Utilities::sendEmailTemplate($customer_email, 'order_new', array('orderid' => $order[0]['order_number'], 'fullname' => $customer, 'email' => $email, 'bank' => $bank, 'url' => $url, ':shineisp:' => $order[0]['Customers'], 'conditions' => strip_tags(Settings::findbyParam('conditions'))), null, null, null, null, $language_id);
         return true;
     }
     return false;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:40,代码来源:Orders.php

示例4: checkServices


//.........这里部分代码省略.........
                             $params = json_decode($olditem['parameters'], true);
                             // 								Zend_Debug::dump($olditem);
                             // 								Zend_Debug::dump($params);
                             // 								Zend_Debug::dump($domain['domain']);
                             // Extract the domain name and match it with the domain selected
                             if (!empty($params['domain']) && $params['domain']['name'] == $domain['domain']) {
                                 $customers[$domain['customer_id']]['products'][$i]['oldorderitemid'] = $olditemorder['orderitem_id'];
                             }
                         }
                     }
                 }
                 Shineisp_Commons_Utilities::log("- " . $domain['domain']);
                 $i++;
             }
         }
         /*
          * Now we have to get the services expired and we have to sum the previous $customers array with these
          * new information.
          */
         // Get all the services active that expire the day after
         $services = OrdersItems::getExpiringServicesByDays(1, Statuses::id("complete", "orders"));
         if ($services) {
             Shineisp_Commons_Utilities::log("There are (" . count($services) . ") new services to renew");
             // Create the customer group list for the email summary
             foreach ($services as $service) {
                 if (is_numeric($service['reseller'])) {
                     $invoice_dest = Customers::getAllInfo($service['reseller']);
                     $customers[$service['customer_id']]['id'] = $invoice_dest['customer_id'];
                     $customers[$service['customer_id']]['fullname'] = $invoice_dest['firstname'] . " " . $invoice_dest['lastname'] . " " . $invoice_dest['company'];
                     $customers[$service['customer_id']]['email'] = $invoice_dest['email'];
                     $customers[$service['customer_id']]['password'] = $invoice_dest['password'];
                     $customers[$service['customer_id']]['language_id'] = $invoice_dest['language_id'];
                 } else {
                     $customers[$service['customer_id']]['id'] = $service['id'];
                     $customers[$service['customer_id']]['fullname'] = $service['fullname'];
                     $customers[$service['customer_id']]['email'] = $service['email'];
                     $customers[$service['customer_id']]['password'] = $service['password'];
                     $customers[$service['customer_id']]['language_id'] = $service['language_id'];
                 }
                 $customers[$service['customer_id']]['products'][$i]['name'] = $service['product'];
                 $customers[$service['customer_id']]['products'][$i]['type'] = "service";
                 $customers[$service['customer_id']]['products'][$i]['renew'] = $service['renew'];
                 $customers[$service['customer_id']]['products'][$i]['expiring_date'] = $service['expiringdate'];
                 $customers[$service['customer_id']]['products'][$i]['days'] = $service['days'];
                 $customers[$service['customer_id']]['products'][$i]['oldorderitemid'] = $service['detail_id'];
                 Shineisp_Commons_Utilities::log("- " . $service['product']);
                 $i++;
             }
         }
         // Create the email messages for the customers
         if (count($customers) > 0) {
             foreach ($customers as $customer) {
                 $items = "";
                 // **** CREATE THE ORDER FOR ALL THE AUTORENEWABLE DOMAINS/SERVICES ***
                 // ============================================================
                 // Renew all the services and domain where the customer has choosen the autorenew of the service.
                 $orderID = Orders::renewOrder($customer['id'], $customer['products']);
                 if (is_numeric($orderID)) {
                     $link = Fastlinks::findlinks($orderID, $customer['id'], 'orders');
                     // Create the fast link to include in the email
                     if (!empty($link[0]['code'])) {
                         $url = "http://" . $_SERVER['HTTP_HOST'] . "/index/link/id/" . $link[0]['code'];
                     } else {
                         $url = "http://" . $_SERVER['HTTP_HOST'];
                     }
                     Shineisp_Commons_Utilities::sendEmailTemplate($customer['email'], 'order_renew', array('fullname' => $customer['fullname'], ':shineisp:' => $customer, 'url' => $url), null, null, null, null, $customer['language_id'], Settings::findbyParam('cron_notify'));
                 }
             }
         }
         /*
          * Now we have to set as expired all the domains records that the date is the date of the expiring of the domain
          * // Expired
          */
         $dq = Doctrine_Query::create()->update('Domains d')->set('d.status_id', Statuses::id('expired', 'domains'))->where('DATEDIFF(d.expiring_date, CURRENT_DATE) <= ?', 0)->addWhere('DATEDIFF(d.expiring_date, CURRENT_DATE) >= ?', 0);
         $dq->execute(null, Doctrine::HYDRATE_ARRAY);
         /*
          * Now we have to set as closed all the domains records that the date is older of -2 days
          * // Closed
          */
         $dq = Doctrine_Query::create()->update('Domains d')->set('d.status_id', Statuses::id('suspended', 'domains'))->where('DATEDIFF(d.expiring_date, CURRENT_DATE) <= ?', -2);
         $dq->execute(null, Doctrine::HYDRATE_ARRAY);
         /*
          * Now we have to set as expired all the services records
          * // Expired
          */
         $dq = Doctrine_Query::create()->update('OrdersItems oi')->set('oi.status_id', Statuses::id('expired', 'orders'))->where('DATEDIFF(oi.date_end, CURRENT_DATE) <= ?', 0);
         $dq->execute(null, Doctrine::HYDRATE_ARRAY);
         /*
          * Now we have to set as deleted all the services records
          * // Deleted
          */
         $dq = Doctrine_Query::create()->update('OrdersItems oi')->set('oi.status_id', Statuses::id('deleted', 'orders'))->where('DATEDIFF(oi.date_end, CURRENT_DATE) <= ?', -2);
         $dq->execute(null, Doctrine::HYDRATE_ARRAY);
         Shineisp_Commons_Utilities::sendEmailTemplate(null, 'cron', array('cronjob' => 'Check Services'), null, null, null, null, null, Settings::findbyParam('cron_notify'));
     } catch (Exception $e) {
         Shineisp_Commons_Utilities::logs($e->getMessage(), "cron.log");
         return false;
     }
     return true;
 }
开发者ID:moay,项目名称:shineisp,代码行数:101,代码来源:Cronjobs.php

示例5: sendMail

 /**
  * Send the email profile to the user
  */
 public function sendMail($task)
 {
     $ISP = ISP::getByCustomerId($task['customer_id']);
     if (!$ISP || !isset($ISP['isp_id']) || !is_numeric($ISP['isp_id'])) {
         // ISP not found, can't send mail
         return false;
     }
     // Get the service details
     $service = OrdersItems::getAllInfo($task['orderitem_id']);
     // If the setup has been written by the task action then ...
     if (!empty($service['setup'])) {
         $setup = json_decode($service['setup'], true);
         // Get the service/product name
         $productname = !empty($service['Products']['ProductsData'][0]['name']) ? $service['Products']['ProductsData'][0]['name'] : "";
         $welcome_mail = !empty($service['Products']['welcome_mail_id']) && intval($service['Products']['welcome_mail_id']) > 0 ? intval($service['Products']['welcome_mail_id']) : 'new_hosting';
         // new_hosting = fallback to old method if no template is set
         // Check if the customer is present in the service and if there is a welcome_mail set for the bought product
         if (!empty($service['Orders']['Customers'])) {
             // Getting the customer
             $customer = $service['Orders']['Customers'];
             $strSetup = "";
             foreach ($setup as $section => $details) {
                 $strSetup .= strtoupper($section) . "<hr/>";
                 foreach ($details as $label => $detail) {
                     $strSetup .= "{$label}: " . $detail . "<br/>";
                 }
                 $strSetup .= "<br/>";
             }
             Shineisp_Commons_Utilities::sendEmailTemplate($ISP['email'], $welcome_mail, array('setup' => $strSetup, 'fullname' => $customer['firstname'] . " " . $customer['lastname'], 'hostingplan' => $productname, 'controlpanel' => $ISP['website'] . ":8080", 'signature' => $ISP['company']), null, null, null, $ISP, $customer['language_id']);
         }
     }
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:35,代码来源:Base.php

示例6: resetpwdAction

 public function resetpwdAction()
 {
     $request = $this->getRequest();
     $resetKey = $request->getParam('id');
     $registry = Shineisp_Registry::getInstance();
     $translator = $registry->Zend_Translate;
     $customer = Customers::getCustomerByResetKey($resetKey);
     if ($customer) {
         $newPwd = Shineisp_Commons_Utilities::GenerateRandomPassword();
         try {
             // Update the record
             Customers::setCustomerPassword($customer[0]['customer_id'], $newPwd);
             // Force expire of reset link
             Customers::deleteResetPasswordKey($customer[0]['customer_id']);
         } catch (Exception $e) {
             echo $e->getMessage();
             die;
         }
         $customer[0]['password'] = $newPwd;
         // Getting the email template
         Shineisp_Commons_Utilities::sendEmailTemplate($customer[0]['email'], 'password_new', array('fullname' => $customer[0]['lastname'], 'email' => $customer[0]['email'], ':shineisp:' => $customer, 'password' => $newPwd), null, null, null, null, $customer[0]['language_id']);
         $this->view->mextype = "success";
         $this->view->mex = $translator->translate('Email sent');
     } else {
         $this->view->mextype = "alert";
         $this->view->mex = $translator->translate('An error occurred while setting your password. Please try again.');
     }
     return $this->_helper->viewRenderer('password');
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:29,代码来源:IndexController.php

示例7: welcome_mail

 /**
  * Send the welcome email to the selected user and reset the password
  * @param integer $customerid
  * @return Boolean
  */
 public static function welcome_mail($customerid, $passwd = "")
 {
     $data = self::getAllInfo($customerid);
     $isp = Isp::getActiveISP();
     // Reset password
     if (empty($passwd)) {
         $passwd = Shineisp_Commons_Utilities::GenerateRandomPassword();
         self::reset_password($customerid, $passwd);
     }
     Shineisp_Commons_Utilities::sendEmailTemplate($data['email'], 'account_new', array('storename' => $isp['company'], 'website' => $isp['website'], 'email' => $data['email'], 'fullname' => $data['fullname'], 'signature' => $isp['company'], 'password' => $passwd), null, null, null, null, $data['language_id']);
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:16,代码来源:Customers.php

示例8: sendMessage

 /**
  * Send a message using a template
  * 
  * @param string $tpl Name of the template without the extension
  * @param string $to  Email address
  * @param array $placeholders 
  */
 public static function sendMessage($tpl, $to, array $placeholders, $language_id = null)
 {
     Shineisp_Commons_Utilities::sendEmailTemplate($to, $tpl, $placeholders, null, null, null, null, $language_id);
     return true;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:12,代码来源:Messages.php

示例9: sendCreateConfirm

 /**
  * Send the email as renew confirm. 
  * 
  * 
  * @param $domain_id
  * @return void
  */
 public static function sendCreateConfirm($domain_id)
 {
     if (is_numeric($domain_id)) {
         $domain = self::getAllInfo($domain_id, null, "domain_id, customer_id, CONCAT(c.firstname, ' ', c.lastname) as fullname, c.language_id as language_id, c.email as email, CONCAT(d.domain, '.', d.tld) as domain", true);
         if (!empty($domain[0])) {
             Shineisp_Commons_Utilities::sendEmailTemplate($domain[0]['email'], 'domain_created', array(':shineisp:' => $domain), null, null, null, null, $domain['language_id']);
         }
     }
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:16,代码来源:Domains.php

示例10: responseAction

 /**
  * Process the response of the banks gateways
  * 
  * @return void
  */
 public function responseAction()
 {
     $request = $this->getRequest();
     $response = $request->getParams();
     if (!empty($response['custom']) && is_numeric(trim($response['custom']))) {
         $isp = Shineisp_Registry::get('ISP');
         // Orderid back from the bank
         $order_id = trim($response['custom']);
         // Getting the md5 value in order to match with the class name.
         $classrequest = $request->gateway;
         // Get the bank selected using the MD5 code
         $bank = Banks::findbyMD5($classrequest);
         if (!empty($bank[0]['classname'])) {
             if (!empty($bank[0]['classname']) && class_exists($bank[0]['classname'])) {
                 $class = $bank[0]['classname'];
                 $payment = new $class($order_id);
                 // Check if the method "Response" exists in the Payment class and send all the bank information to the payment module
                 if (method_exists($class, "Response")) {
                     $OrderID = $payment->Response($response);
                 } else {
                     $OrderID = false;
                 }
             }
         }
         // Check if the OrderID is a number because it
         // means that the order has been executed correctly
         if (is_numeric($OrderID)) {
             // Sending an email to the customer and the administrator with the order details.
             $order = Orders::getAllInfo($OrderID, null, true);
             Shineisp_Commons_Utilities::sendEmailTemplate($order[0]['Customers']['email'], 'order_confirm', array('fullname' => $order[0]['Customers']['fullname'], 'orderid' => $OrderID, 'order' => $order), null, null, null, null, $order[0]['Customers']['language_id']);
             // Redirect the user in the The task requested has been executed successfully. page
             $this->_helper->redirector('list', 'orders', 'default', array('mex' => 'The task requested has been executed successfully.', 'status' => 'success'));
         }
     }
     $this->_helper->redirector('list', 'orders', 'default', array('mex' => 'There was a problem during the payment process.', 'status' => 'danger'));
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:41,代码来源:OrdersController.php

示例11: sendInvoice

 public static function sendInvoice($invoiceid, $urlEmail = "")
 {
     if (is_numeric($invoiceid)) {
         $invoice = self::getAllInfo($invoiceid, null, true);
         if (!empty($invoice[0])) {
             $invoiceNum = $invoice[0]['number'];
             $orderid = $invoice[0]['order_id'];
             $customerid = $invoice[0]['customer_id'];
         } else {
             return false;
         }
         $fastlink = self::getFastlinksInvoice($invoiceid, $orderid, $customerid);
         $order = Orders::getAllInfo($orderid, null, true);
         //if customer comes from reseller
         if ($order[0]['Customers']['parent_id']) {
             $invoice_dest = Customers::getAllInfo($order[0]['Customers']['parent_id']);
             $customer = $invoice_dest['firstname'] . " " . $invoice_dest['lastname'];
             $customer .= !empty($invoice_dest['company']) ? " - " . $invoice_dest['company'] : "";
             $customer_email = $invoice_dest['email'];
             $language_id = $invoice_dest['language_id'];
         } else {
             $customer = $order[0]['Customers']['firstname'] . " " . $order[0]['Customers']['lastname'];
             $customer .= !empty($order[0]['Customers']['company']) ? " - " . $order[0]['Customers']['company'] : "";
             $customer_email = Contacts::getEmails($customerid);
             $language_id = $order[0]['Customers']['language_id'];
         }
         $email = $order[0]['Isp']['email'];
         $signature = $order[0]['Isp']['company'];
         if ($urlEmail == "") {
             $url = "http://" . $_SERVER['HTTP_HOST'] . "/index/link/id/" . $fastlink;
         } else {
             $url = $urlEmail;
         }
         $date = explode("-", $order[0]['order_date']);
         Shineisp_Commons_Utilities::sendEmailTemplate($customer_email, 'new_invoice', array('orderid' => $order[0]['order_number'], 'invoiceid' => sprintf("%03s", $invoiceNum) . "/" . $date[0], 'fullname' => $customer, 'email' => $email, 'url' => $url, ':shineisp:' => $order[0]['Customers'], 'conditions' => strip_tags(Settings::findbyParam('conditions'))), null, null, null, null, $language_id);
         return true;
     }
     return false;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:39,代码来源:Invoices.php

示例12: send

 /**
  * Send ticket by email
  * 
  * @param integer $id
  * @param boolean $isTicket
  * @param string $attachment
  */
 public static function send($id, $isTicket = true, $attachment = null)
 {
     $isp = Isp::getActiveISP();
     $placeholders = array();
     $customer_url = "";
     $admin_url = "";
     if ($isTicket) {
         $ticket = self::getAllInfo($id, null, true);
         $customer = $ticket[0]['Customers'];
         $operator = AdminUser::getAllInfo($ticket[0]['user_id']);
     } else {
         $ticket = TicketsNotes::getAllInfo($id);
         $customer = $ticket[0]['Tickets']['Customers'];
         $operator = AdminUser::getAllInfo($ticket[0]['Tickets']['user_id']);
     }
     if (!empty($ticket[0])) {
         if ($isp) {
             $ispmail = explode("@", $isp['email']);
             $retval = Shineisp_Commons_Utilities::getEmailTemplate('ticket_message');
             if ($retval) {
                 $s = $retval['subject'];
                 $ticketid = $ticket[0]['ticket_id'];
                 $in_reply_to = md5($ticketid);
                 $ispmail = "noreply@" . $ispmail[1];
                 $rec = Fastlinks::findlinks($ticketid, $customer['customer_id'], 'tickets');
                 if (!empty($rec[0]['code'])) {
                     $customer_url = "http://" . $_SERVER['HTTP_HOST'] . "/index/link/id/" . $rec[0]['code'];
                     $admin_url = "http://" . $_SERVER['HTTP_HOST'] . "/admin/login/link/id/" . $rec[0]['code'];
                 }
                 // Check the attachments
                 if (!empty($attachment) && file_exists(PUBLIC_PATH . $attachment)) {
                     $attachment = PUBLIC_PATH . $attachment;
                 }
                 if ($isTicket) {
                     $placeholders['subject'] = $ticket[0]['subject'];
                     $placeholders['description'] = $ticket[0]['description'];
                     $placeholders['date_open'] = Shineisp_Commons_Utilities::formatDateOut($ticket[0]['date_open']);
                     $placeholders['status'] = $ticket[0]['Statuses']['status'];
                 } else {
                     $placeholders['subject'] = $ticket[0]['Tickets']['subject'];
                     $placeholders['description'] = $ticket[0]['note'];
                     $placeholders['date_open'] = Shineisp_Commons_Utilities::formatDateOut($ticket[0]['Tickets']['date_open']);
                     $placeholders['status'] = $ticket[0]['Tickets']['Statuses']['status'];
                 }
                 $placeholders['customer'] = $customer['firstname'] . " " . $customer['lastname'] . " " . $customer['company'];
                 $placeholders['link'] = $customer_url;
                 $placeholders['company'] = $isp['company'];
                 $placeholders['issue_number'] = $ticketid;
                 $placeholders['operator'] = $operator['lastname'] . " " . $operator['firstname'];
                 // Send a message to the customer
                 Shineisp_Commons_Utilities::sendEmailTemplate(Contacts::getEmails($customer['customer_id']), 'ticket_message', $placeholders, $in_reply_to, $attachment, null, $isp, $customer['language_id']);
                 // Update the link for the administrator email
                 $placeholders['link'] = $admin_url . "/keypass/" . Shineisp_Commons_Hasher::hash_string($operator['email']);
                 Shineisp_Commons_Utilities::sendEmailTemplate($isp['email'], 'ticket_message', $placeholders, $in_reply_to, $attachment, null, $isp);
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:67,代码来源:Tickets.php


注:本文中的Shineisp_Commons_Utilities::sendEmailTemplate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。