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


PHP email::add_html方法代码示例

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


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

示例1: send

 function send($newsletter_id)
 {
     $mail_query = smn_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
     $mimemessage = new email(array('X-Mailer: oscMall bulk mailer'));
     $mimemessage->add_html($this->content);
     $mimemessage->build_message();
     while ($mail = smn_db_fetch_array($mail_query)) {
         $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title);
     }
     $newsletter_id = smn_db_prepare_input($newsletter_id);
     smn_db_query("update " . TABLE_NEWSLETTERS . " set date_sent = now(), status = '1' where newsletters_id = '" . smn_db_input($newsletter_id) . "'");
 }
开发者ID:stanislauslive,项目名称:StanMarket,代码行数:12,代码来源:newsletter.php

示例2: 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

示例3: 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'));
     // 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();
     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:wrtcoder,项目名称:mini_isp,代码行数:18,代码来源:newsletter.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: 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

示例7: email

        //        break;
        default:
            $affiliate_email_address = olc_db_prepare_input($_POST['affiliate_email_address']);
            $mail_query = olc_db_query("select affiliate_firstname, affiliate_lastname, affiliate_email_address from " . TABLE_AFFILIATE . " where affiliate_email_address = '" . olc_db_input($affiliate_email_address) . APOS);
            $mail_sent_to = $_POST['affiliate_email_address'];
            break;
    }
    $from = olc_db_prepare_input($_POST['from']);
    $subject = olc_db_prepare_input($_POST['subject']);
    $message = olc_db_prepare_input($_POST['message']);
    // Instantiate a new mail object
    $mimemessage = new email(array('X-Mailer: OLC mailer'));
    // Build the text version
    $text = strip_tags($text);
    if (EMAIL_USE_HTML == TRUE_STRING_S) {
        $mimemessage->add_html($message);
    } else {
        $mimemessage->add_text($message);
    }
    // Send message
    $mimemessage->build_message();
    while ($mail = olc_db_fetch_array($mail_query)) {
        $mimemessage->send($mail['affiliate_firstname'] . BLANK . $mail['affiliate_lastname'], $mail['affiliate_email_address'], '', $from, $subject);
    }
    olc_redirect(olc_href_link(FILENAME_AFFILIATE_CONTACT, 'mail_sent_to=' . urlencode($mail_sent_to)));
}
if ($_GET['action'] == 'preview' && !$_POST['affiliate_email_address']) {
    $messageStack->add(ERROR_NO_AFFILIATE_SELECTED, 'error');
}
if (olc_not_null($_GET['mail_sent_to'])) {
    $messageStack->add(sprintf(NOTICE_EMAIL_SENT_TO, $_GET['mail_sent_to']), 'notice');
开发者ID:BackupTheBerlios,项目名称:ol-commerce-svn,代码行数:31,代码来源:affiliate_contact.php

示例8: 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

示例9: 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

示例10: 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

示例11: array

    $shop_email = tep_db_fetch_array($shop_email_query);
    $shops_array[$shops['shops_id']] = array('title' => $shop_name['configuration_value'], 'email' => $shop_email['configuration_value']);
}
tep_db_select_db(DB_DATABASE);
$query = tep_db_query("select customers_email_address, customers_firstname, customers_lastname, shops_id from " . TABLE_CUSTOMERS . " where 1 order by customers_id");
while ($rows = tep_db_fetch_array($query)) {
    $to_name = $rows['customers_firstname'];
    $to_full_name = trim($rows['customers_firstname'] . ' ' . $rows['customers_lastname']);
    $to_email = $rows['customers_email_address'];
    $from_name = $shops_array[$rows['shops_id']]['title'];
    $from_email = $shops_array[$rows['shops_id']]['email'];
    $email_subject = sprintf($letter_subject, $from_name);
    $email_text = sprintf($letter_text, $to_name, $from_name, $from_name);
    $message = new email(array('X-Mailer: ' . $from_name));
    $text = strip_tags($email_text);
    $message->add_html($email_text, $text, DIR_FS_CATALOG_IMAGES . 'Image/');
    //	  print_r($message->html_images);
    $message->build_message();
    $message->send($to_full_name, $to_email, $from_name, $from_email, $email_subject);
}
echo '<script>alert("Готово!");</script>';
die;
$products_array = '';
$products_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_types_id = '10' and (products_filename = '' or products_filename is null)");
while ($products = tep_db_fetch_array($products_query)) {
    $products_array[] = $products['products_id'];
}
print_r($products_array);
//  tep_remove_product($products_array);
die('ready');
tep_set_time_limit(600);
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:discounts.php

示例12: while

    $from = tep_db_prepare_input($_POST['from']);
    $subject = tep_db_prepare_input($_POST['subject']);
    while ($mail = tep_db_fetch_array($mail_query)) {
        $message = tep_db_prepare_input($_POST['message']);
        $message .= 'Dear ' . $mail['customers_firstname'] . "\n\n";
        $message .= TEXT_TO_REDEEM . "\n\n";
        $message .= TEXT_VOUCHER_IS . $coupon_result['coupon_code'] . "\n\n";
        $message .= TEXT_REMEMBER . "\n\n";
        $message .= TEXT_VISIT . "\n\n";
        $message .= TEXT_SIGN_OFF . "\n\n";
        //Let's build a message object using the email class
        $mimemessage = new email(array('X-Mailer: osCommerce'));
        // Build the text version
        $text = strip_tags($message);
        if (EMAIL_USE_HTML == 'true') {
            $mimemessage->add_html($message, $text);
        } else {
            $mimemessage->add_text($text);
        }
        $mimemessage->build_message();
        $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', $from, $subject);
    }
    tep_redirect(tep_href_link(FILENAME_COUPON_ADMIN, 'mail_sent_to=' . urlencode($mail_sent_to)));
}
if ($_GET['action'] == 'preview_email' && !$_POST['customers_email_address']) {
    $_GET['action'] = 'email';
    $messageStack->add(ERROR_NO_CUSTOMER_SELECTED, 'error');
}
if ($_GET['mail_sent_to']) {
    $messageStack->add(sprintf(NOTICE_EMAIL_SENT_TO, $_GET['mail_sent_to']), 'notice');
}
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:31,代码来源:coupon_admin.php

示例13: trim

 function send_mail($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $html)
 {
     $from_email_address = trim(implode('', array_map('trim', explode("\n", $from_email_address))));
     $from_email_name = trim(implode('', array_map('trim', explode("\n", $from_email_name))));
     $text = tep_html_entity_decode($text);
     $html = $this->get_template_params(trim($html));
     if ($this->debug) {
         echo $email_subject;
         echo $html;
     }
     if (tep_not_null($to_email_address)) {
         // Instantiate a new mail object
         $message = new email();
         // Build the text version
         $text = strip_tags($html);
         $message->add_html($html, $text);
         // Send message
         $message->build_message();
         if ($this->send) {
             $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
         }
     }
 }
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:23,代码来源:subscribe.php

示例14: legacy_zen_mail

function legacy_zen_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: 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);
    // eof: body of the email clean-up
    // 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:severnaya99,项目名称:Sg-2010,代码行数:40,代码来源:functions_general.php

示例15: tep_mail_string_attachment

function tep_mail_string_attachment($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address, $string, $filename)
{
    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);
    }
    // Now add string attachment - new method of email.php
    $message->add_string_attachment($string, $filename, 'application/pdf');
    // Send message
    $message->build_message();
    $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
}
开发者ID:rongandat,项目名称:scalaprj,代码行数:20,代码来源:general.php


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