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


PHP Mail::setHTML方法代码示例

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


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

示例1: resetPasswordMail

 public function resetPasswordMail($email, $password)
 {
     $customer = $this->getCustomerByEmail($email);
     $data = array('firstname' => $customer['firstname'], 'lastname' => $customer['lastname'], 'email' => $customer['email'], 'password' => $password);
     #Reset Password id = 3
     $subject = $this->emailtemplate->getSubject('Customer', 'customer_3', $data);
     $message = $this->emailtemplate->getMessage('Customer', 'customer_3', $data);
     $mail = new Mail($this->config->get('config_mail'));
     $mail->setTo($data['email']);
     $mail->setFrom($this->config->get('config_email'));
     $mail->setSender($this->config->get('config_name'));
     $mail->setSubject($subject);
     $mail->setHTML($message);
     $mail->send();
 }
开发者ID:LinuxJedi,项目名称:arastta,代码行数:15,代码来源:customer.php

示例2: sendCustomerRegisterMail

 public function sendCustomerRegisterMail($data)
 {
     if (isset($data['customer_group_id']) && is_array($this->config->get('config_customer_group_display')) && in_array($data['customer_group_id'], $this->config->get('config_customer_group_display'))) {
         $customer_group_id = $data['customer_group_id'];
     } else {
         $customer_group_id = $this->config->get('config_customer_group_id');
     }
     $this->load->model('sale/customer_group');
     $customer_group_info = $this->model_sale_customer_group->getCustomerGroup($customer_group_id);
     #Get Email Template
     if (!$customer_group_info['approval']) {
         #Customer Registration Register
         $subject = $this->emailtemplate->getSubject('Customer', 'customer_1', $data);
         $message = $this->emailtemplate->getMessage('Customer', 'customer_1', $data);
     } else {
         #Customer Registration Approve
         $subject = $this->emailtemplate->getSubject('Customer', 'customer_2', $data);
         $message = $this->emailtemplate->getMessage('Customer', 'customer_2', $data);
     }
     $mail = new Mail($this->config->get('config_mail'));
     $mail->setTo($data['email']);
     $mail->setFrom($this->config->get('config_email'));
     $mail->setSender($this->config->get('config_name'));
     $mail->setSubject($subject);
     $mail->setHTML($message);
     $mail->send();
     // Send to main admin email if new account email is enabled
     if ($this->config->get('config_account_mail')) {
         $mail->setTo($this->config->get('config_email'));
         $mail->send();
         $emails = explode(',', $this->config->get('config_alert_emails'));
         foreach ($emails as $email) {
             if (strlen($email) > 0 && preg_match('/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$/i', $email)) {
                 $mail->setTo($email);
                 $mail->send();
             }
         }
     }
 }
开发者ID:royopa,项目名称:arastta,代码行数:39,代码来源:customer.php

示例3: resetPasswordMail

 public function resetPasswordMail($email, $password)
 {
     $affiliate = $this->getAffiliateByEmail($email);
     $data = array('firstname' => $affiliate['firstname'], 'lastname' => $affiliate['lastname'], 'email' => $affiliate['email'], 'password' => $password);
     $subject = $this->emailtemplate->getSubject('Affiliate', 'affiliate_3', $data);
     $message = $this->emailtemplate->getMessage('Affiliate', 'affiliate_3', $data);
     $mail = new Mail($this->config->get('config_mail'));
     $mail->setTo($data['email']);
     $mail->setFrom($this->config->get('config_email'));
     $mail->setSender($this->config->get('config_name'));
     $mail->setSubject($subject);
     $mail->setHTML($message);
     $mail->send();
 }
开发者ID:royopa,项目名称:arastta,代码行数:14,代码来源:affiliate.php

示例4: suporte

 public function suporte()
 {
     $assunto = $this->request->get['suporteAssunto'];
     $mensagem = $this->request->get['suporteMensagem'];
     $mensagem .= '<br/><br/>Site: ' . HTTP_CATALOG;
     $mail = new Mail();
     $mail->protocol = $this->config->get('config_mail_protocol');
     $mail->parameter = $this->config->get('config_mail_parameter');
     $mail->hostname = $this->config->get('config_smtp_host');
     $mail->username = $this->config->get('config_smtp_username');
     $mail->password = $this->config->get('config_smtp_password');
     $mail->port = $this->config->get('config_smtp_port');
     $mail->timeout = $this->config->get('config_smtp_timeout');
     $mail->setTo('valdeirpsr@hotmail.com.br');
     $mail->setFrom($this->config->get('config_email'));
     $mail->setSender($this->config->get('config_name'));
     $mail->setSubject($assunto);
     $mail->setHTML($mensagem);
     $mail->send();
 }
开发者ID:Reallogic,项目名称:moip-opencart-valdeir,代码行数:20,代码来源:moip.php

示例5: addOrderHistory


//.........这里部分代码省略.........
                 $this->load->model('affiliate/affiliate');
                 $this->model_affiliate_affiliate->deleteCommission($order_id);
             }
         }
         $this->cache->delete('product');
         if (in_array($order_status_id, array_merge($this->config->get('config_processing_status'), $this->config->get('config_complete_status'))) || $notify) {
             $order_status = $this->db->query("SELECT name FROM " . DB_PREFIX . "order_status WHERE order_status_id = '" . (int) $order_status_id . "' AND language_id = '" . (int) $order_info['language_id'] . "'");
             if ($order_status->num_rows) {
                 $order_status = $order_status->row['name'];
             } else {
                 $order_status = '';
             }
             // Account Href
             $order_href = '';
             if ($order_info['customer_id']) {
                 $order_href = $order_info['store_url'] . 'index.php?route=account/order/info&order_id=' . $order_info['order_id'];
             }
             #Address Shipping and Payment
             $totals = array();
             $tax_amount = 0;
             if (strlen($order_info['shipping_firstname']) != 0) {
                 $address = $order_info['shipping_firstname'] . ' ' . $order_info['shipping_lastname'] . '<br />' . (strlen($order_info['shipping_company']) != 0 ? $order_info['shipping_company'] . '<br />' : '') . '' . $order_info['shipping_address_1'] . '<br />' . $order_info['shipping_city'] . ' ' . $order_info['shipping_postcode'] . '<br />' . $order_info['shipping_zone'] . ' ' . $order_info['shipping_country'];
             } else {
                 $address = '';
             }
             if (strlen($order_info['payment_firstname']) != 0) {
                 $payment_address = $order_info['payment_firstname'] . ' ' . $order_info['payment_lastname'] . '<br />' . (strlen($order_info['payment_company']) != 0 ? $order_info['payment_company'] . '<br />' : '') . '' . $order_info['payment_address_1'] . '<br />' . $order_info['payment_city'] . ' ' . $order_info['payment_postcode'] . '<br />' . $order_info['payment_zone'] . ' ' . $order_info['payment_country'];
             } else {
                 $payment_address = '';
             }
             $order_total = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order_total` WHERE order_id = '" . (int) $order_info['order_id'] . "'");
             foreach ($order_total->rows as $total) {
                 $totals[$total['code']][] = array('title' => $total['title'], 'text' => $this->currency->format($total['value'], $order_info['currency_code'], $order_info['currency_value']), 'value' => $total['value']);
                 if ($total['code'] == 'tax') {
                     $tax_amount += $total['value'];
                 }
             }
             $special = NULL;
             $data = array('template_id' => 'order_' . (int) $order_status_id, 'order_info' => $order_info, 'address' => $address, 'payment_address' => $payment_address, 'special' => $special, 'order_href' => $order_href, 'order_status' => $order_status, 'totals' => $totals, 'tax_amount' => $tax_amount, 'invoice_no' => !empty($invoice_no) ? $invoice_no : '');
             $subject = $this->emailtemplate->getSubject('OrderAll', 'order_' . (int) $order_status_id, $data);
             $message = $this->emailtemplate->getMessage('OrderAll', 'order_' . (int) $order_status_id, $data);
             $getTotal = $order_total->rows;
             $textData = array('order_info' => $order_info, 'order_id' => $order_id, 'order_status' => $order_status, 'comment' => $comment, 'notify' => $notify, 'getProdcuts' => $this->getOrderProducts($order_id), 'getVouchers' => $this->getOrderVouchers($order_id), 'getTotal' => $getTotal);
             $text = $this->emailtemplate->getText('Order', 'order', $textData);
             #Send Email
             if (!$order_info['order_status_id'] && $order_status_id || $order_info['order_status_id'] && $order_status_id && $notify) {
                 $mail = new Mail($this->config->get('config_mail'));
                 $mail->setTo($order_info['email']);
                 $mail->setFrom($this->config->get('config_email'));
                 $mail->setSender($order_info['store_name']);
                 $mail->setSubject($subject);
                 $mail->setHtml($message);
                 $mail->setText($text);
                 $mail->send();
             }
             if ($this->config->get('config_order_mail')) {
                 if (!isset($mail)) {
                     $mail = new Mail($this->config->get('config_mail'));
                     $mail->setTo($order_info['email']);
                     $mail->setFrom($this->config->get('config_email'));
                     $mail->setSender($order_info['store_name']);
                 }
                 $mail->setHTML($message);
                 $mail->setText($text);
                 $mail->setTo($this->config->get('config_email'));
                 $mail->send();
                 $emails = explode(',', $this->config->get('config_alert_emails'));
                 foreach ($emails as $email) {
                     if ($email && preg_match('/^[^\\@]+@.*\\.[a-z]{2,6}$/i', $email)) {
                         $mail->setTo($email);
                         $mail->send();
                     }
                 }
             }
             #If select admin send mail AddOrderHistory
             /*if (($order_info['order_status_id'] && $order_status_id && $notify)) {
                                 $mail->setHTML($message);
             					$mail->setText($text);
                                 $mail->setTo($this->config->get('config_email'));
                                 $mail->send();
             
                                 $emails = explode(',', $this->config->get('config_alert_emails'));
             
                                 foreach ($emails as $email) {
                                     if ($email && preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $email)) {
                                         $mail->setTo($email);
                                         $mail->send();
                                     }
                                 }
                             }*/
         }
     }
     // If order status in the complete range create any vouchers that where in the order need to be made available.
     if (!in_array($order_info['order_status_id'], $this->config->get('config_complete_status')) && in_array($order_status_id, $this->config->get('config_complete_status'))) {
         // Send out any gift voucher mails
         $this->load->model('checkout/voucher');
         $this->model_checkout_voucher->confirm($order_id);
     }
     $this->trigger->fire('post.order.history.add', $order_id);
 }
开发者ID:hoanglehuu,项目名称:arastta,代码行数:101,代码来源:order.php

示例6: addReturnHistory

 public function addReturnHistory($return_id, $data)
 {
     $this->query("UPDATE PREFIX_return\n            SET return_status_id    = :status_id,\n                date_modified       = :date\n            WHERE return_id         = :id", array('status_id' => $data['return_status_id'], 'date' => date('Y-m-d H:i:s'), 'id' => $return_id));
     if (!isset($data['notify'])) {
         $data['notify'] = 0;
     }
     $data['date'] = date('Y-m-d H:i:s');
     $data['return_id'] = $return_id;
     $this->query("INSERT INTO PREFIX_return_history\n            SET return_id           = :return_id,\n                return_status_id    = :return_status_id,\n                notify              = :notify,\n                comment             = :comment,\n                date_added          = :date", $data);
     if ($data['notify']) {
         $return_data = $this->getReturn($return_id);
         Mailer::setCustomer($return_data);
         Mailer::setReturn($return_data);
         $mail = Mailer::getTemplate('update_return_status_' . $data['return_status_id']);
         if (!empty($data['comment'])) {
             $mail['content'] = str_replace('{hasComments}', $data['comment'] . '<br /><br />', $mail['content']);
         } else {
             $mail['content'] = str_replace('{hasComments}', '', $mail['content']);
         }
         Mail::setTo($return_data['email']);
         Mail::setSubject($mail['title']);
         Mail::setHTML($mail['content']);
         Mail::send();
     }
     Cache::removeAll();
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:26,代码来源:return.php

示例7: Auth

     echo json_encode($_RETURN);
     if ($userId != 0 && $_GET['sendMessage'] == 'true') {
         require_once _ENGINE . 'Mail.class.php';
         require_once _ENGINE . 'Auth.class.php';
         require_once _ENGINE . 'HTML.class.php';
         $Auth = new Auth($Db);
         $HTML = new HTML();
         $HTML->get('template/activationMail.html');
         $code = $Auth->generateCode(40);
         $isAdd = $Db->insert('userActivation', array('code', 'user'), array($code, $userId));
         $HTML->replace(array('siteName', 'siteUrl', 'code'), array(_SITENAME, _SITEURL, $code));
         $MailSender = new Mail();
         $headers = array('From: Blinnaya76 <blinnaya76.ru>');
         $MailSender->setHeaders($headers);
         $MailSender->sendTo($data->mail);
         $MailSender->setHTML($HTML->get());
         $MailSender->sendMail();
     }
 }
 /**
  * Пользователи
  * @method: Получить данные пользователя по ид
  * @params: ID пользователя
  * */
 if ($_a == 'getUser') {
     $id = $_GET['id'];
     $res = $Db->select('SELECT id, login, f, i, o, type, email FROM user WHERE id = ' . $Db->quote($id));
     if ($res) {
         $_RETURN['status'] = 1;
         $_RETURN['data'] = $res[0];
     } else {
开发者ID:bustEXZ,项目名称:AdministrationPanel,代码行数:31,代码来源:ajax.php

示例8: updateStatus

 public function updateStatus($order_id, $status_id, $sendMail = null, $comment = null)
 {
     $this->query("UPDATE PREFIX_orders SET order_status = :status WHERE order_id = :id", array('id' => $order_id, 'status' => $status_id));
     if ($sendMail == null) {
         $sendMail = $this->config->get('customer_notify_email');
     }
     if ($sendMail) {
         $order_info = $this->getOrder($order_id);
         Mailer::setOrder($order_info);
         Mailer::setCustomer($order_info['customer']);
         //$template = Mailer::getTemplate('update_order_status_' . $status_id, !empty($order_info['customer']['language_id']) ? $order_info['customer']['language_id'] : null);
         $template = Mailer::getTemplate('update_order_status_' . $status_id, null);
         Mail::setTo($order_info['customer']['email']);
         Mail::setSubject($template['title']);
         if ($comment != null) {
             $template['content'] = str_replace('{hasComments}', $comment, $template['content']);
         } else {
             $template['content'] = str_replace('{hasComments}', '', $template['content']);
         }
         Mail::setHTML($template['content']);
         Mail::send();
     }
 }
开发者ID:wardvanderput,项目名称:SumoStore,代码行数:23,代码来源:orders.php


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