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


PHP mailer::addEmbeddedImage方法代码示例

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


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

示例1: currencies

 } else {
     $languages = xos_db_fetch_array($languages_query);
 }
 $used_lang_id = $_SESSION['used_lng_id'];
 $_SESSION['used_lng_id'] = $languages['languages_id'];
 $currencies = new currencies();
 if (EMAIL_USE_HTML == 'true') {
     $smarty_gv_email->assign(array('html_params' => HTML_PARAMS, 'xhtml_lang' => $languages['code'], 'charset' => CHARSET, 'store_name_address' => STORE_NAME_ADDRESS, 'store_name' => STORE_NAME, 'src_embedded_shop_logo' => 'cid:shop_logo', 'src_shop_logo' => HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . (is_file(DIR_FS_CATALOG_IMAGES . 'email_shop_logo/' . EMAIL_SHOP_LOGO) ? 'email_shop_logo/' : 'catalog/templates/' . DEFAULT_TPL . '/') . EMAIL_SHOP_LOGO, 'gv_message' => $message, 'gv_id' => $id1, 'gv_amount' => $currencies->format($amount), 'link_shop' => xos_catalog_href_link(), 'link_gv_redeem' => xos_catalog_href_link(FILENAME_CATALOG_GV_REDEEM, 'gv_no=' . $id1, 'SSL')));
     $smarty_gv_email->configLoad('languages/' . $languages['directory'] . '_email.conf', 'gv_email_html');
     $output_gv_email_html = $smarty_gv_email->fetch(DEFAULT_TPL . '/includes/email/gv_email_html.tpl');
     $smarty_gv_email->configLoad('languages/' . $languages['directory'] . '_email.conf', 'gv_email_text');
     $output_gv_email_text = $smarty_gv_email->fetch(DEFAULT_TPL . '/includes/email/gv_email_text.tpl');
     $gv_email->isHTML(true);
     $gv_email->Body = $output_gv_email_html;
     $gv_email->AltBody = $output_gv_email_text;
     $gv_email->addEmbeddedImage(DIR_FS_CATALOG . (is_file(DIR_FS_CATALOG . 'images/email_shop_logo/' . EMAIL_SHOP_LOGO) ? 'images/email_shop_logo/' : 'images/catalog/templates/' . DEFAULT_TPL . '/') . EMAIL_SHOP_LOGO, 'shop_logo', '', 'base64', 'image/' . substr(strrchr(EMAIL_SHOP_LOGO, '.'), 1));
 } else {
     $smarty_gv_email->assign(array('store_name_address' => STORE_NAME_ADDRESS, 'store_name' => STORE_NAME, 'gv_message' => $message, 'gv_id' => $id1, 'gv_amount' => $currencies->format($amount), 'link_shop' => xos_catalog_href_link(), 'link_gv_redeem' => xos_catalog_href_link(FILENAME_CATALOG_GV_REDEEM, 'gv_no=' . $id1, 'SSL')));
     $smarty_gv_email->configLoad('languages/' . $languages['directory'] . '_email.conf', 'gv_email_text');
     $output_gv_email_text = $smarty_gv_email->fetch(DEFAULT_TPL . '/includes/email/gv_email_text.tpl');
     $gv_email->isHTML(false);
     $gv_email->Body = $output_gv_email_text;
 }
 $gv_email->addAddress($mail_sent_to);
 if (!$gv_email->send()) {
     $mailer_error = true;
     $messageStack->add_session('header', sprintf(ERROR_PHP_MAILER, $gv_email->ErrorInfo, $mail_sent_to), 'error');
 } else {
     // Now create the coupon email entry
     xos_db_query("insert into " . TABLE_COUPONS . " (coupon_code, coupon_type, coupon_amount, date_created) values ('" . $id1 . "', 'G', '" . $amount . "', now())");
     $insert_id = xos_db_insert_id();
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:gv_mail.php


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