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


PHP email::add_text方法代码示例

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


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

示例1: send

 function send($affiliate_newsletter_id)
 {
     $mail_query = tep_db_query("select affiliate_firstname, affiliate_lastname, affiliate_email_address from " . TABLE_AFFILIATE . " where affiliate_newsletter = '1'");
     $mimemessage = new email(array('X-Mailer: osCmax Mailer'));
     $mimemessage->add_text($this->content);
     $mimemessage->build_message();
     while ($mail = tep_db_fetch_array($mail_query)) {
         $mimemessage->send($mail['affiliate_firstname'] . ' ' . $mail['affiliate_lastname'], $mail['affiliate_email_address'], '', EMAIL_FROM, $this->title);
     }
     $affiliate_newsletter_id = tep_db_prepare_input($affiliate_newsletter_id);
     tep_db_query("update " . TABLE_AFFILIATE_NEWSLETTERS . " set date_sent = now(), status = '1' where affiliate_newsletters_id = '" . tep_db_input($affiliate_newsletter_id) . "'");
 }
开发者ID:digideskio,项目名称:oscmax2,代码行数:12,代码来源:affiliate_newsletter.php

示例2: 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'");
     $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer'));
     $mimemessage->add_text($this->content);
     $mimemessage->build_message();
     while ($mail = tep_db_fetch_array($mail_query)) {
         $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:quangbt2005,项目名称:belamdep,代码行数:12,代码来源:newsletter.php

示例3: tep_mail

function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address, $html_email = false)
{
    // Instantiate a new mail object
    $message = new email(array('X-Mailer: E-goldexJp Mailer'));
    // Build the text version
    $text = strip_tags($email_text);
    // edit by donghp 27/03/2012
    if ($html_email) {
        $message->add_html($email_text, $text);
    } else {
        $message->add_text($text);
    }
    // Send message
    $message->build_message();
    $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
}
开发者ID:rongandat,项目名称:ookcart-project,代码行数:16,代码来源:general.php

示例4: email_now

function email_now($t_key, $tpl, $extra, $lang = NULL)
{
    if (SEND_EMAILS != 'true') {
        return false;
    }
    if (!isset($lang) || !$lang) {
        $lang = $language;
    }
    $tpquery = tep_db_query("SELECT * FROM email_now_templates WHERE email_template_key='{$t_key}' ORDER BY language_id!='{$lang}',language_id LIMIT 1");
    if ($tpinfo = tep_db_fetch_array($tpquery)) {
        $message = new email(array('X-Mailer: IntenseCart'));
        if (EMAIL_USE_HTML == 'true' && $tpinfo['send_mode'] == 'html') {
            $message->add_html(email_now_expand($tpinfo['email_template_html'], $tpl, 'html', ' '), email_now_expand($tpinfo['email_template_text'], $tpl));
        } else {
            $message->add_text(email_now_expand($tpinfo['email_template_text'], $tpl));
        }
        // # Send message
        $message->build_message();
        $to_name = email_now_expand($tpinfo['to_name'], $tpl, 'text', ' ');
        $to_email = email_now_expand($tpinfo['to_email'], $tpl, 'text', ' ');
        $from_name = email_now_expand($tpinfo['from_name'], $tpl, 'text', ' ');
        $from_email = email_now_expand($tpinfo['from_email'], $tpl, 'text', ' ');
        $subj = email_now_expand($tpinfo['email_subject'], $tpl, 'text', ' ');
        if (!empty($to_name)) {
            $message->send($to_name, $to_email, $from_name, $from_email, $subj);
            if (is_array($extra)) {
                foreach ($extra as $cc) {
                    $ar = array();
                    if (preg_match('/^\\s*(.*?)\\s*<\\s*(.*?)\\s*>/', $cc, $ar)) {
                        $cc_name = $ar[1];
                        $cc_email = $ar[2];
                    } else {
                        $cc_name = '';
                        $cc_email = $cc;
                    }
                    $message->send($cc_name, $cc_email, $from_name, $from_email, $subj . " [Fwd: {$to_name} <{$to_email}>]");
                }
            }
        }
    } else {
        return false;
    }
}
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:43,代码来源:email_now.php

示例5: 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'");
     $mimemessage = new email(array('X-Mailer: osCmax Mailer'));
     // BOF: MOD - WYSIWYG HTML Area (Send TEXT Newsletter v1.7 when WYSIWYG Disabled)
     if (HTML_AREA_WYSIWYG_DISABLE_NEWSLETTER == 'Disable') {
         $mimemessage->add_text($this->content);
         // orginal OSC line
     } else {
         $mimemessage->add_html($this->content);
     }
     // EOF: MOD - WYSIWYG HTML Area (Send TEXT Newsletter v1.7 when WYSIWYG Disabled)
     $mimemessage->build_message();
     while ($mail = tep_db_fetch_array($mail_query)) {
         $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:digideskio,项目名称:oscmax2,代码行数:19,代码来源:newsletter.php

示例6: sendEmail

 function sendEmail()
 {
     if (PHP_VERSION < 4.1) {
         global $_GET;
     }
     global $osC_Database;
     $max_execution_time = 0.8 * (int) ini_get('max_execution_time');
     $time_start = explode(' ', PAGE_PARSE_START_TIME);
     $Qrecipients = $osC_Database->query('select c.customers_firstname, c.customers_lastname, c.customers_email_address from :table_customers c left join :table_newsletters_log nl on (c.customers_email_address = nl.email_address and nl.newsletters_id = :newsletters_id) where c.customers_newsletter = 1 and nl.email_address is null');
     $Qrecipients->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qrecipients->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
     $Qrecipients->bindInt(':newsletters_id', $this->_newsletter_id);
     $Qrecipients->execute();
     if ($Qrecipients->numberOfRows() > 0) {
         $mimemessage = new email(array(base64_decode('WC1NYWlsZXI6IG9zQ29tbWVyY2UgKGh0dHA6Ly93d3cub3Njb21tZXJjZS5jb20p')));
         $mimemessage->add_text($this->_newsletter_content);
         $mimemessage->build_message();
         while ($Qrecipients->next()) {
             $mimemessage->send($Qrecipients->value('customers_firstname') . ' ' . $Qrecipients->value('customers_lastname'), $Qrecipients->value('customers_email_address'), '', EMAIL_FROM, $this->_newsletter_title);
             $Qlog = $osC_Database->query('insert into :table_newsletters_log (newsletters_id, email_address, date_sent) values (:newsletters_id, :email_address, now())');
             $Qlog->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
             $Qlog->bindInt(':newsletters_id', $this->_newsletter_id);
             $Qlog->bindValue(':email_address', $Qrecipients->value('customers_email_address'));
             $Qlog->execute();
             $time_end = explode(' ', microtime());
             $timer_total = number_format($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0]), 3);
             if ($timer_total > $max_execution_time) {
                 echo '<p><font color="#38BB68"><b>' . TEXT_REFRESHING_PAGE . '</b></font></p>' . '<p><a href="' . tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nmID=' . $this->_newsletter_id . '&action=nmSendConfirm') . '">' . TEXT_CONTINUE_MANUALLY . '</a></p>' . '<META HTTP-EQUIV="refresh" content="2; URL=' . tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nmID=' . $this->_newsletter_id . '&action=nmSendConfirm') . '">';
                 exit;
             }
         }
         $Qrecipients->freeResult();
     }
     $Qupdate = $osC_Database->query('update :table_newsletters set date_sent = now(), status = 1 where newsletters_id = :newsletters_id');
     $Qupdate->bindTable(':table_newsletters', TABLE_NEWSLETTERS);
     $Qupdate->bindInt(':newsletters_id', $this->_newsletter_id);
     $Qupdate->execute();
 }
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:38,代码来源:newsletter.php

示例7: tep_mail

function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address)
{
    if (SEND_EMAILS != 'true') {
        return false;
    }
    // Instantiate a new mail object
    $message = new email(array('X-Mailer: osCommerce'));
    // Build the text version
    $text = strip_tags($email_text);
    if (EMAIL_USE_HTML == 'true') {
        $message->add_html($email_text, $text);
    } else {
        $message->add_text($text);
    }
    // Send message
    $message->build_message();
    $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
}
开发者ID:tapwag,项目名称:oscommerce_deutsch,代码行数:18,代码来源:general.php

示例8: email

                $sent_to = olc_db_fetch_array($sent_to_query);
                $mail_sent_to = $sent_to['customers_status_name'];
            } else {
                $customers_email_address = olc_db_prepare_input($_POST['customers_email_address']);
                $mail_query = olc_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . olc_db_input($customers_email_address) . APOS);
                $mail_sent_to = $_POST['customers_email_address'];
            }
            break;
    }
    $from = olc_db_prepare_input($_POST['from']);
    $subject = olc_db_prepare_input($_POST['subject']);
    $message = olc_db_prepare_input($_POST['message']);
    //Let's build a message object using the email class
    $mimemessage = new email(array('X-Mailer: OL-Commerce bulk mailer'));
    // add the message to the object
    $mimemessage->add_text($message);
    $mimemessage->build_message();
    while ($mail = olc_db_fetch_array($mail_query)) {
        $mimemessage->send($mail['customers_firstname'] . BLANK . $mail['customers_lastname'], $mail['customers_email_address'], '', $from, $subject);
    }
    olc_redirect(olc_href_link(FILENAME_MAIL, 'mail_sent_to=' . urlencode($mail_sent_to)));
}
if ($_GET['action'] == 'preview' && !$_POST['customers_email_address']) {
    $messageStack->add(ERROR_NO_CUSTOMER_SELECTED, 'error');
}
if ($_GET['mail_sent_to']) {
    $messageStack->add(sprintf(NOTICE_EMAIL_SENT_TO, $_GET['mail_sent_to']), 'notice');
}
require DIR_WS_INCLUDES . 'header.php';
?>
<table border="0" width="100%" cellspacing="2" cellpadding="2">
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:mail.php

示例9: zen_mail


//.........这里部分代码省略.........
        //define some additional html message blocks available to templates, then build the html portion.
        if ($block['EMAIL_TO_NAME'] == '') {
            $block['EMAIL_TO_NAME'] = $to_name;
        }
        if ($block['EMAIL_TO_ADDRESS'] == '') {
            $block['EMAIL_TO_ADDRESS'] = $to_email_address;
        }
        if ($block['EMAIL_SUBJECT'] == '') {
            $block['EMAIL_SUBJECT'] = $email_subject;
        }
        if ($block['EMAIL_FROM_NAME'] == '') {
            $block['EMAIL_FROM_NAME'] = $from_email_name;
        }
        if ($block['EMAIL_FROM_ADDRESS'] == '') {
            $block['EMAIL_FROM_ADDRESS'] = $from_email_address;
        }
        $email_html = zen_build_html_email_from_template($module, $block);
        //  if ($attachments_list == '') $attachments_list= array();
        // Instantiate a new mail object
        $message = new email(array('X-Mailer: Zen Cart Mailer'));
        // bof: body of the email clean-up
        // clean up &amp; and && from email text
        while (strstr($email_text, '&amp;&amp;')) {
            $email_text = str_replace('&amp;&amp;', '&amp;', $email_text);
        }
        while (strstr($email_text, '&amp;')) {
            $email_text = str_replace('&amp;', '&', $email_text);
        }
        while (strstr($email_text, '&&')) {
            $email_text = str_replace('&&', '&', $email_text);
        }
        // clean up money &euro; to e
        while (strstr($email_text, '&euro;')) {
            $email_text = str_replace('&euro;', 'e', $email_text);
        }
        // fix double quotes
        while (strstr($email_text, '&quot;')) {
            $email_text = str_replace('&quot;', '"', $email_text);
        }
        // fix slashes
        $email_text = stripslashes($email_text);
        $email_html = stripslashes($email_html);
        // eof: body of the email clean-up
        //determine customer's email preference type: HTML or TEXT-ONLY  (HTML assumed if not specified)
        $customers_email_format_read = $db->Execute("select customers_email_format from " . TABLE_CUSTOMERS . " where customers_email_address= '" . $to_email_address . "'");
        $customers_email_format = $customers_email_format_read->fields['customers_email_format'];
        if ($customers_email_format == 'NONE' || $customers_email_format == 'OUT') {
            return;
        }
        //if requested no mail, then don't send.
        if ($customers_email_format == 'HTML') {
            $customers_email_format = 'HTML';
        }
        // if they opted-in to HTML messages, then send HTML format
        //determine what format to send messages in if this is an "extra"/admin-copy email:
        if (ADMIN_EXTRA_EMAIL_FORMAT == 'TEXT' && substr($module, -6) == '_extra') {
            $email_html = '';
            // just blank out the html portion if admin has selected text-only
        }
        // Build the email based on whether customer has selected HTML or TEXT, and whether we have supplied HTML or TEXT-only components
        if (!zen_not_null($email_text)) {
            $text = str_replace('<br[[:space:]]*/?[[:space:]]*>', "@CRLF", $block['EMAIL_MESSAGE_HTML']);
            $text = str_replace('</p>', '</p>@CRLF', $text);
            $text = htmlspecialchars(stripslashes(strip_tags($text)));
        } else {
            $text = strip_tags($email_text);
        }
        if (EMAIL_USE_HTML == 'true' && trim($email_html) != '' && ($customers_email_format == 'HTML' || ADMIN_EXTRA_EMAIL_FORMAT != 'TEXT' && substr($module, -6) == '_extra')) {
            $message->add_html($email_html, $text);
        } else {
            $message->add_text($text);
            $email_html = '';
            // since sending a text-only message, empty the HTML portion so it's not archived either.
        }
        // process attachments
        if (EMAIL_ATTACHMENTS_ENABLED && zen_not_null($attachments_list)) {
            //    while ( list($key, $value) = each($attachments_list)) {
            $fileraw = $message->get_file(DIR_FS_ADMIN . 'attachments/' . $attachments_list['file']);
            $filemime = zen_not_null($attachments_list['file_type']) ? $attachments_list['file_type'] : $message->findMime($attachments_list);
            //findMime determines what type this attachment is (XLS, PDF, etc) and sends proper vendor c_type.
            $message->add_attachment($fileraw, $attachments_list['file'], $filemime);
            //     } //endwhile attach_list
        }
        //endif attachments
        // Prepare message
        $message->build_message();
        // send the actual email
        $result = $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
        if (!$result) {
            $messageStack->add(sprintf(EMAIL_SEND_FAILED, $to_name, $to_email_address, $email_subject), 'error');
        }
        // Archive this message to storage log
        if (EMAIL_ARCHIVE == 'true' && $module != 'password_forgotten_admin' && $module != 'cc_middle_digs') {
            // don't archive pwd-resets and CC numbers
            zen_mail_archive_write($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $email_html, $text, $module);
        }
        // endif archiving
    }
    // end foreach loop thru possible multiple email addresses
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:101,代码来源:functions_email.php

示例10: sendEmail

 function sendEmail()
 {
     if (PHP_VERSION < 4.1) {
         global $_GET, $_POST;
     }
     global $osC_Database;
     $max_execution_time = 0.8 * (int) ini_get('max_execution_time');
     $time_start = explode(' ', PAGE_PARSE_START_TIME);
     if (isset($_POST['chosen'])) {
         $chosen = $_POST['chosen'];
     } elseif (isset($_GET['chosen'])) {
         $chosen = $_GET['chosen'];
     } elseif (isset($_POST['global'])) {
         $global = $_POST['global'];
     } elseif (isset($_GET['global'])) {
         $global = $_GET['global'];
     }
     $chosen_get_string = '';
     if (isset($chosen) && !empty($chosen)) {
         foreach ($chosen as $id) {
             $chosen_get_string .= 'chosen[]=' . $id . '&';
         }
     }
     $audience = array();
     $Qcustomers = $osC_Database->query('select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from :table_customers c, :table_customers_info ci where ci.global_product_notifications = 1 and ci.customers_info_id = c.customers_id');
     $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qcustomers->bindTable(':table_customers_info', TABLE_CUSTOMERS_INFO);
     $Qcustomers->execute();
     while ($Qcustomers->next()) {
         if (!isset($audience[$Qcustomers->valueInt('customers_id')])) {
             $audience[$Qcustomers->valueInt('customers_id')] = array('firstname' => $Qcustomers->value('customers_firstname'), 'lastname' => $Qcustomers->value('customers_lastname'), 'email_address' => $Qcustomers->value('customers_email_address'));
         }
     }
     $Qcustomers = $osC_Database->query('select distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from :table_products_notifications pn, :table_customers c left join :table_newsletters_log nl on (c.customers_email_address = nl.email_address and nl.newsletters_id = :newsletters_id) where pn.customers_id = c.customers_id and nl.email_address is null');
     $Qcustomers->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
     $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS);
     $Qcustomers->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
     $Qcustomers->bindInt(':newsletters_id', $this->_newsletter_id);
     if (isset($chosen) && !empty($chosen)) {
         $Qcustomers->appendQuery('and pn.products_id in (:products_id)');
         $Qcustomers->bindRaw(':products_id', implode(', ', $chosen));
     }
     $Qcustomers->execute();
     while ($Qcustomers->next()) {
         if (!isset($audience[$Qcustomers->valueInt('customers_id')])) {
             $audience[$Qcustomers->valueInt('customers_id')] = array('firstname' => $Qcustomers->value('customers_firstname'), 'lastname' => $Qcustomers->value('customers_lastname'), 'email_address' => $Qcustomers->value('customers_email_address'));
         }
     }
     if (sizeof($audience) > 0) {
         $mimemessage = new email(array(base64_decode('WC1NYWlsZXI6IG9zQ29tbWVyY2UgKGh0dHA6Ly93d3cub3Njb21tZXJjZS5jb20p')));
         $mimemessage->add_text($this->_newsletter_content);
         $mimemessage->build_message();
         foreach ($audience as $key => $value) {
             $mimemessage->send($value['firstname'] . ' ' . $value['lastname'], $value['email_address'], '', EMAIL_FROM, $this->_newsletter_title);
             $Qlog = $osC_Database->query('insert into :table_newsletters_log (newsletters_id, email_address, date_sent) values (:newsletters_id, :email_address, now())');
             $Qlog->bindTable(':table_newsletters_log', TABLE_NEWSLETTERS_LOG);
             $Qlog->bindInt(':newsletters_id', $this->_newsletter_id);
             $Qlog->bindValue(':email_address', $value['email_address']);
             $Qlog->execute();
             $time_end = explode(' ', microtime());
             $timer_total = number_format($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0]), 3);
             if ($timer_total > $max_execution_time) {
                 echo '<p><font color="#38BB68"><b>' . TEXT_REFRESHING_PAGE . '</b></font></p>' . '<p><a href="' . tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nmID=' . $this->_newsletter_id . '&action=nmSendConfirm&' . (isset($global) && $global == 'true' ? 'global=true' : $chosen_get_string)) . '">' . TEXT_CONTINUE_MANUALLY . '</a></p>' . '<META HTTP-EQUIV="refresh" content="2; URL=' . tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nmID=' . $this->_newsletter_id . '&action=nmSendConfirm&' . (isset($global) && $global == 'true' ? 'global=true' : $chosen_get_string)) . '">';
                 exit;
             }
         }
     }
     $Qupdate = $osC_Database->query('update :table_newsletters set date_sent = now(), status = 1 where newsletters_id = :newsletters_id');
     $Qupdate->bindTable(':table_newsletters', TABLE_NEWSLETTERS);
     $Qupdate->bindInt(':newsletters_id', $this->_newsletter_id);
     $Qupdate->execute();
 }
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:72,代码来源:product_notification.php

示例11: tep_update_all_shops


//.........这里部分代码省略.........
                            } else {
                                $product_email_name = (tep_not_null($author_info['authors_name']) ? $author_info['authors_name'] . ': ' : '') . $product_name_info['products_name'];
                            }
                            $new_status = $new_info['products_listing_status'];
                            $new_price = $new_info['products_price'];
                            $old_status = $old_info['products_listing_status'];
                            $old_price = $old_info['products_price'];
                            $customer_info_query = tep_db_query("select customers_firstname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $notify_products['customers_id'] . "'");
                            $customer_info = tep_db_fetch_array($customer_info_query);
                            $notification_body = '';
                            $notification_subject = '';
                            $notification_warning = '';
                            if ($notify_products['customers_basket_notify'] == '1') {
                                // о появлении в продаже
                                if ($new_status == '1') {
                                    if ($lang_id == 1) {
                                        $notification_body = EMAIL_NOTIFICATION_BODY_EN_1;
                                        $notification_subject = EMAIL_NOTIFICATION_SUBJECT_EN_1;
                                        $notification_warning = EMAIL_NOTIFICATION_WARNING_EN_1;
                                    } else {
                                        $notification_body = EMAIL_NOTIFICATION_BODY_1;
                                        $notification_subject = EMAIL_NOTIFICATION_SUBJECT_1;
                                        $notification_warning = EMAIL_NOTIFICATION_WARNING_1;
                                    }
                                }
                            } elseif ($notify_products['customers_basket_notify'] == '2') {
                                // о снижении цены
                                if ($new_price > 0 && $new_price < $old_price) {
                                    if ($lang_id == 1) {
                                        $notification_body = EMAIL_NOTIFICATION_BODY_EN_2;
                                        $notification_subject = EMAIL_NOTIFICATION_SUBJECT_EN_2;
                                        $notification_warning = EMAIL_NOTIFICATION_WARNING_EN_2;
                                    } else {
                                        $notification_body = EMAIL_NOTIFICATION_BODY_2;
                                        $notification_subject = EMAIL_NOTIFICATION_SUBJECT_2;
                                        $notification_warning = EMAIL_NOTIFICATION_WARNING_2;
                                    }
                                }
                            }
                            if (tep_not_null($notification_body)) {
                                $email_notification_body = str_replace('{{product_link}}', $notify_products['customers_basket_notify_url'], sprintf($notification_body, $customer_info['customers_firstname'], $product_email_name)) . "\n\n" . EMAIL_NOTIFICATION_SEPARATOR . "\n" . sprintf($notification_warning, $shop_name);
                                $message = new email(array('X-Mailer: ' . $shop_name));
                                $text = strip_tags($email_notification_body);
                                if ($shops['shops_email_use_html'] < 1) {
                                    $message->add_text($text);
                                } else {
                                    ob_start();
                                    include DIR_FS_CATALOG . 'images/mail/email_header_1.php';
                                    echo trim($email_notification_body);
                                    include DIR_FS_CATALOG . 'images/mail/email_footer_1.php';
                                    $email_text_html = ob_get_clean();
                                    $email_text_html = str_replace(array('<title></title>', '{{HTTP_SERVER}}', '{{STORE_NAME}}', '{{STORE_OWNER_PHONE_NUMBER}}'), array('<title>' . sprintf($notification_subject, $shop_name) . '</title>', $shops['shops_url'], $shop_name, $shop_phone), $email_text_html);
                                    $message->add_html($email_text_html, $text);
                                }
                                $message->build_message();
                                $message->send($customer_info['customers_firstname'], $customer_info['customers_email_address'], $shop_name, $shop_email, sprintf($notification_subject, $shop_name));
                                tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_notify = '0', customers_basket_notify_url = null where customers_basket_id = '" . (int) $notify_products['customers_basket_id'] . "'");
                            }
                        }
                    }
                    tep_db_query("drop table " . $shop_db . "." . $temp_table . "");
                    tep_db_query("alter table " . $shop_db . ".temp_" . $temp_table . " rename as " . $shop_db . "." . $temp_table . "");
                    if ($shop_db == 'setbook_ua') {
                        tep_db_query("update " . $shop_db . "." . TABLE_CURRENCIES . " set value = '" . tep_db_input($temp_currencies[$shop_currency]) . "', last_updated = now() where code = '" . tep_db_input($shop_currency) . "'");
                    }
                }
            }
            if ($shops['shops_default_status'] == '1') {
                tep_db_query("delete from " . TABLE_SEARCH_KEYWORDS_TO_PRODUCTS . "");
                tep_db_query("delete from " . TABLE_SEARCH_KEYWORDS . "");
                tep_db_query("update " . TABLE_SPECIALS_TYPES . " set specials_last_modified = now()");
            }
            if ($products_types_default_status == 1) {
                tep_db_query("update " . $shop_db . "." . TABLE_PRODUCTS_TYPES . " set products_last_modified = now() where products_types_id = '1'");
            } else {
                tep_db_query("update " . $shop_db . "." . TABLE_PRODUCTS_TYPES . " set products_last_modified = now() where products_types_id > '1'");
            }
            if ($shop_db == 'setbook_us' || $shop_db == 'setbook_biz') {
                tep_db_query("replace into " . $shop_db . "." . TABLE_METATAGS . " (metatags_page_title, metatags_title, metatags_keywords, metatags_description, language_id, content_type, content_id) select concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_page_title, ' Russian books.'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_title, '. Russian books.'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_keywords, ' Russian books.'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_description, ' Russian books.'), " . DB_DATABASE . "." . TABLE_METATAGS . ".language_id, " . DB_DATABASE . "." . TABLE_METATAGS . ".content_type, " . DB_DATABASE . "." . TABLE_METATAGS . ".content_id from " . DB_DATABASE . "." . TABLE_METATAGS . " where " . DB_DATABASE . "." . TABLE_METATAGS . ".content_type in ('author', 'category', 'manufacturer',  'product', 'serie', 'type');");
                tep_db_query("update " . $shop_db . "." . TABLE_METATAGS . " mt, " . $shop_db . "." . TABLE_PRODUCTS . " p set mt.metatags_page_title = replace(mt.metatags_page_title, 'Russian books', 'Russian magazines'), mt.metatags_title = replace(mt.metatags_title, 'Russian books', 'Russian magazines'), mt.metatags_keywords = replace(mt.metatags_keywords, 'Russian books', 'Russian magazines'), mt.metatags_description = replace(mt.metatags_description, 'Russian books', 'Russian magazines') where mt.content_type = 'product' and mt.content_id = p.products_id and p.products_types_id = '2'");
                tep_db_query("update " . $shop_db . "." . TABLE_METATAGS . " mt, " . $shop_db . "." . TABLE_PRODUCTS . " p set mt.metatags_page_title = replace(mt.metatags_page_title, 'Russian books', 'Russian magazines'), mt.metatags_title = replace(mt.metatags_title, 'Russian books', 'Russian souvenirs. Matreshka'), mt.metatags_keywords = replace(mt.metatags_keywords, 'Russian books', 'Russian magazines'), mt.metatags_description = replace(mt.metatags_description, 'Russian books', 'Russian souvenirs') where mt.content_type = 'product' and mt.content_id = p.products_id and p.products_types_id = '5'");
            } elseif ($shop_db == 'setbook_eu' || $shop_db == 'setbook_net') {
                tep_db_query("replace into " . $shop_db . "." . TABLE_METATAGS . " (metatags_page_title, metatags_title, metatags_keywords, metatags_description, language_id, content_type, content_id) select concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_page_title, ' Russian books. Russische b&uuml;cher'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_title, '. Russian books.'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_keywords, ' Russian books. Russische b&uuml;cher'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_description, ' Russian books. Russische b&uuml;cher'), " . DB_DATABASE . "." . TABLE_METATAGS . ".language_id, " . DB_DATABASE . "." . TABLE_METATAGS . ".content_type, " . DB_DATABASE . "." . TABLE_METATAGS . ".content_id from " . DB_DATABASE . "." . TABLE_METATAGS . " where " . DB_DATABASE . "." . TABLE_METATAGS . ".content_type in ('author', 'category', 'manufacturer',  'product', 'serie', 'type');");
                tep_db_query("update " . $shop_db . "." . TABLE_METATAGS . " mt, " . $shop_db . "." . TABLE_PRODUCTS . " p set mt.metatags_page_title = replace(mt.metatags_page_title, 'Russian books. Russische b&uuml;cher', 'Russian magazines. Russische Zeitschriften'), mt.metatags_title = replace(mt.metatags_title, 'Russian books', 'Russian magazines'), mt.metatags_keywords = replace(mt.metatags_keywords, 'Russian books', 'Russian magazines'), mt.metatags_description = replace(mt.metatags_description, 'Russian books', 'Russian magazines') where mt.content_type = 'product' and mt.content_id = p.products_id and p.products_types_id = '2'");
            } elseif ($shop_db == 'setbook_ua') {
                tep_db_query("replace into " . $shop_db . "." . TABLE_METATAGS . " (metatags_page_title, metatags_title, metatags_keywords, metatags_description, language_id, content_type, content_id) select replace(" . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_page_title, 'Интернет-магазин Setbook', 'Книжный интернет-магазин в Украине Setbook'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_title, '. Книжный интернет-магазин в Украине Setbook.'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_keywords, ' Украина, книги в Киеве.'),\nconcat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_description, ' Украина, книги в Киеве.'), " . DB_DATABASE . "." . TABLE_METATAGS . ".language_id, " . DB_DATABASE . "." . TABLE_METATAGS . ".content_type, " . DB_DATABASE . "." . TABLE_METATAGS . ".content_id from " . DB_DATABASE . "." . TABLE_METATAGS . " where " . DB_DATABASE . "." . TABLE_METATAGS . ".content_type in ('author', 'category', 'manufacturer',  'product', 'serie', 'type');");
                //		  tep_db_query("update " . $shop_db . "." . TABLE_METATAGS . " mt, " . $shop_db . "." . TABLE_PRODUCTS . " p set mt.metatags_page_title = replace(mt.metatags_page_title, 'Russian books', ''), mt.metatags_title = replace(mt.metatags_title, '', ''), mt.metatags_keywords = replace(mt.metatags_keywords, '', ''), mt.metatags_description = replace(mt.metatags_description, '', '') where mt.content_type = 'product' and mt.content_id = p.products_id and p.products_types_id = '2'");
            } elseif ($shop_db == 'setbook_kz') {
                tep_db_query("replace into " . $shop_db . "." . TABLE_METATAGS . " (metatags_page_title, metatags_title, metatags_keywords, metatags_description, language_id, content_type, content_id) select replace(" . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_page_title, 'Интернет-магазин Setbook', 'Книжный интернет-магазин в Казахстане Setbook'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_title, '. Книжный интернет-магазин в Казахстане Setbook.'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_keywords, ' Казахстан, книги в Алматы, Астане, Караганде.'),\nconcat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_description, ' Казахстан, книги в Алматы, Астане, Караганде.'), " . DB_DATABASE . "." . TABLE_METATAGS . ".language_id, " . DB_DATABASE . "." . TABLE_METATAGS . ".content_type, " . DB_DATABASE . "." . TABLE_METATAGS . ".content_id from " . DB_DATABASE . "." . TABLE_METATAGS . " where " . DB_DATABASE . "." . TABLE_METATAGS . ".content_type in ('author', 'category', 'manufacturer',  'product', 'serie', 'type');");
                //		  tep_db_query("update " . $shop_db . "." . TABLE_METATAGS . " mt, " . $shop_db . "." . TABLE_PRODUCTS . " p set mt.metatags_page_title = replace(mt.metatags_page_title, 'Russian books', ''), mt.metatags_title = replace(mt.metatags_title, '', ''), mt.metatags_keywords = replace(mt.metatags_keywords, '', ''), mt.metatags_description = replace(mt.metatags_description, '', '') where mt.content_type = 'product' and mt.content_id = p.products_id and p.products_types_id = '2'");
            } elseif ($shop_db == 'setbook_by' || $shop_db == 'bookva_by') {
                if ($shop_db == 'setbook_by') {
                    tep_db_query("replace into " . $shop_db . "." . TABLE_METATAGS . " (metatags_page_title, metatags_title, metatags_keywords, metatags_description, language_id, content_type, content_id) select replace(" . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_page_title, 'Интернет-магазин Setbook', 'Интернет-магазин книг в Белоруссии Setbook'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_title, '. Интернет-магазин книг Белоруссии Setbook.'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_keywords, ' Белоруссия, книги в Минске.'), concat_ws('', " . DB_DATABASE . "." . TABLE_METATAGS . ".metatags_description, ' Белоруссия, книги в Минске.'), " . DB_DATABASE . "." . TABLE_METATAGS . ".language_id, " . DB_DATABASE . "." . TABLE_METATAGS . ".content_type, " . DB_DATABASE . "." . TABLE_METATAGS . ".content_id from " . DB_DATABASE . "." . TABLE_METATAGS . " where " . DB_DATABASE . "." . TABLE_METATAGS . ".content_type in ('author', 'category', 'manufacturer',  'product', 'serie', 'type');");
                    //			tep_db_query("update " . $shop_db . "." . TABLE_METATAGS . " mt, " . $shop_db . "." . TABLE_PRODUCTS . " p set mt.metatags_page_title = replace(mt.metatags_page_title, 'Russian books', ''), mt.metatags_title = replace(mt.metatags_title, '', ''), mt.metatags_keywords = replace(mt.metatags_keywords, '', ''), mt.metatags_description = replace(mt.metatags_description, '', '') where mt.content_type = 'product' and mt.content_id = p.products_id and p.products_types_id = '2'");
                }
            }
        }
    }
    tep_db_select_db(DB_DATABASE);
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:101,代码来源:general.php

示例12: email

    $email_order .= EMAIL_TEXT_PRODUCTS . "\n" . EMAIL_SEPARATOR . "\n" . $products_ordered . EMAIL_SEPARATOR . "\n";
    for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
        $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
    }
    if ($order->content_type != 'virtual') {
        $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
    }
    $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
    if (is_object(${$payment})) {
        $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
        $payment_class = ${$payment};
        $email_order .= $payment_class->title . "\n\n";
        if ($payment_class->email_footer) {
            $email_order .= $payment_class->email_footer . "\n\n";
        }
    }
    // Add both versions to the email to accomodate people who see html and those that don't
    $ei_message = new email(array('X-Mailer: osCommerce Mailer'));
    // Build the text version
    $ei_text = strip_tags($email_order);
    if (!empty($ei_html_email)) {
        $ei_message->add_html($ei_html_email, $ei_text);
    } else {
        $ei_message->add_text($ei_text);
    }
    $ei_message->build_message();
    $ei_message->send($order->customer['name'], $order->customer['email_address'], STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT);
    if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
        $ei_message->send('', SEND_EXTRA_ORDER_EMAILS_TO, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT);
    }
}
开发者ID:eosc,项目名称:EosC-2.3,代码行数:31,代码来源:email_invoice.php

示例13: send

 function send($newsletter_id)
 {
     global $HTTP_POST_VARS;
     $audience = array();
     if (isset($HTTP_POST_VARS['global']) && $HTTP_POST_VARS['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 = $HTTP_POST_VARS['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'));
     // Build the text version
     $text = strip_tags($this->content);
     if (EMAIL_USE_HTML == 'true') {
         $mimemessage->add_html($this->content, $text);
     } else {
         $mimemessage->add_text($text);
     }
     $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:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:41,代码来源:product_notification.php

示例14: smn_mail

function smn_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address)
{
    if (SEND_EMAILS != 'true') {
        return false;
    }
    //Remove any newline and anything after it on the header fields of the mail.
    //$to_email_address and $from_email_address are checked with smn_validate_email().
    $to_name = preg_replace('/[\\n|\\r].*/', '', $to_name);
    $email_subject = preg_replace('/[\\n|\\r].*/', '', $email_subject);
    $from_name = preg_replace('/[\\n|\\r].*/', '', $from_name);
    // Instantiate a new mail object
    $message = new email(array('X-Mailer: oscMall Mailer'));
    // Build the text version
    $text = strip_tags($email_text);
    if (EMAIL_USE_HTML == 'true') {
        $message->add_html($email_text, $text);
    } else {
        $message->add_text($text);
    }
    // Send message
    $message->build_message();
    $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
}
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:23,代码来源:general.php

示例15: 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: osCmax Mailer'));
     // BOF: MOD - WYSIWYG HTML Area (Send TEXT Product Notifications v1.7 when WYSIWYG Disabled)
     if (HTML_AREA_WYSIWYG_DISABLE_NEWSLETTER == 'Disable') {
         $mimemessage->add_text($this->content);
         // Orginal OSC line
     } else {
         $mimemessage->add_html($this->content);
     }
     // EOF: MOD - WYSIWYG HTML Area (Send TEXT Product Notifications v1.7 when WYSIWYG Disabled)
     $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:digideskio,项目名称:oscmax2,代码行数:42,代码来源:product_notification.php


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