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


PHP email::add_html_newsletter方法代码示例

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


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

示例1: send

 function send($newsletter_id)
 {
     $mail_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
     while ($mail = tep_db_fetch_array($mail_query)) {
         $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer'));
         // Préparation de l'envoie du mail en HTML
         $mimemessage->add_html_newsletter($this->header . "\n\n" . $this->content . "\n\n" . $this->unsubscribea . " " . '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>' . "\n\n" . $this->unsubscribeb);
         $mimemessage->build_message();
         // ################# END - Contribution Newsletter v050 ##############
         $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title);
     }
     $newsletter_id = tep_db_prepare_input($newsletter_id);
     tep_db_query("update " . TABLE_NEWSLETTERS . " set date_sent = now(), status = '1' where newsletters_id = '" . tep_db_input($newsletter_id) . "'");
 }
开发者ID:eosc,项目名称:EosC-2.3,代码行数:14,代码来源:newsletter.php

示例2: email

            $subscribers_email_address = tep_db_prepare_input($_POST['subscribers_email_address']);
            $mail_query = tep_db_query("select subscribers_firstname, subscribers_lastname, subscribers_email_address from " . TABLE_SUBSCRIBERS . " where subscribers_email_address = '" . tep_db_input($subscribers_email_address) . "'");
            $mail_sent_to = $_POST['subscribers_email_address'];
            break;
    }
    $from = tep_db_prepare_input($_POST['from']);
    $subject = tep_db_prepare_input($_POST['subject']);
    $message = tep_db_prepare_input($_POST['message']);
    //Let's build a message object using the email class
    $mimemessage = new email(array('X-Mailer: osCommerce'));
    // add the message to the object
    // MaxiDVD Added Line For WYSIWYG HTML Area: BOF (Send TEXT Email when WYSIWYG Disabled)
    if (HTML_AREA_WYSIWYG_DISABLE_EMAIL == 'Disable') {
        $mimemessage->add_text($message);
    } else {
        $mimemessage->add_html_newsletter($message);
    }
    // MaxiDVD Added Line For WYSIWYG HTML Area: EOF (Send HTML Email when WYSIWYG Enabled)
    $mimemessage->build_message();
    while ($mail = tep_db_fetch_array($mail_query)) {
        $mimemessage->send($mail['subscribers_firstname'] . ' ' . $mail['subscribers_lastname'], $mail['subscribers_email_address'], '', $from, $subject);
    }
    tep_redirect(tep_href_link(FILENAME_MAILS, 'mail_sent_to=' . urlencode($mail_sent_to)));
}
if ($_GET['action'] == 'preview' && !$_POST['subscribers_email_address']) {
    $messageStack->add(ERROR_NO_SUBSCRIBER_SELECTED, 'error');
}
if ($_GET['mail_sent_to']) {
    $messageStack->add(sprintf(NOTICE_EMAIL_SENT_TO, $_GET['mail_sent_to']), 'notice');
}
?>
开发者ID:eosc,项目名称:EosC-2.3,代码行数:31,代码来源:mails.php

示例3: send

 function send($newsletter_id)
 {
     global $_POST;
     $audience = array();
     if (isset($_POST['global']) && $_POST['global'] == 'true') {
         $products_query = tep_db_query("select distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from " . TABLE_CUSTOMERS . " c, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where c.customers_id = pn.customers_id");
         while ($products = tep_db_fetch_array($products_query)) {
             $audience[$products['customers_id']] = array('firstname' => $products['customers_firstname'], 'lastname' => $products['customers_lastname'], 'email_address' => $products['customers_email_address']);
         }
         $customers_query = tep_db_query("select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_id = ci.customers_info_id and ci.global_product_notifications = '1'");
         while ($customers = tep_db_fetch_array($customers_query)) {
             $audience[$customers['customers_id']] = array('firstname' => $customers['customers_firstname'], 'lastname' => $customers['customers_lastname'], 'email_address' => $customers['customers_email_address']);
         }
     } else {
         $chosen = $_POST['chosen'];
         $ids = implode(',', $chosen);
         $products_query = tep_db_query("select distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from " . TABLE_CUSTOMERS . " c, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where c.customers_id = pn.customers_id and pn.products_id in (" . $ids . ")");
         while ($products = tep_db_fetch_array($products_query)) {
             $audience[$products['customers_id']] = array('firstname' => $products['customers_firstname'], 'lastname' => $products['customers_lastname'], 'email_address' => $products['customers_email_address']);
         }
         $customers_query = tep_db_query("select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_id = ci.customers_info_id and ci.global_product_notifications = '1'");
         while ($customers = tep_db_fetch_array($customers_query)) {
             $audience[$customers['customers_id']] = array('firstname' => $customers['customers_firstname'], 'lastname' => $customers['customers_lastname'], 'email_address' => $customers['customers_email_address']);
         }
     }
     $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer'));
     // ################# Contribution Newsletter v050 ##############
     $mimemessage->add_html_newsletter($this->header . "\n\n" . $this->content . "\n\n" . $this->unsubscribea . " " . HTTP_SERVER . DIR_WS_CATALOG . " " . $this->unsubscribeb . " " . $customers['customers_email_address']);
     // ################# END - Contribution Newsletter v050 ##############
     $mimemessage->build_message();
     reset($audience);
     while (list($key, $value) = each($audience)) {
         $mimemessage->send($value['firstname'] . ' ' . $value['lastname'], $value['email_address'], '', EMAIL_FROM, $this->title);
     }
     $newsletter_id = tep_db_prepare_input($newsletter_id);
     tep_db_query("update " . TABLE_NEWSLETTERS . " set date_sent = now(), status = '1' where newsletters_id = '" . tep_db_input($newsletter_id) . "'");
 }
开发者ID:eosc,项目名称:EosC-2.3,代码行数:37,代码来源:product_notification.php


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