全球主机论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 797|回复: 0

如何让ECSHOP下订单给客户发邮件

[复制链接]
发表于 2014-12-15 20:12:03 | 显示全部楼层 |阅读模式


全有客户咨询我为什么ecshop后台邮件服务器设置没有问题,下单是却发不了邮件呢?
后来研究下,好像有这不BUG,于是找出解决方法分享给大家:
找到flow.php文件,如果给商家发邮件请参照下面  
  /* 给商家发邮件 */
    /* 增加是否给客服发送邮件选项 */
    if ($_CFG['send_service_email'] && $_CFG['service_email'] != '')
    {
        $tpl = get_mail_template('remind_of_new_order');
        $smarty->assign('order', $order);
        $smarty->assign('goods_list', $cart_goods);
        $smarty->assign('shop_name', $_CFG['shop_name']);
        $smarty->assign('send_date', date($_CFG['time_format']));
        $content = $smarty->fetch('str:' . $tpl['template_content']);
        send_mail($_CFG['shop_name'], $_CFG['service_email'], $tpl['template_subject'], $content, $tpl['is_html']);
    }

增加下面的代码就可以实现。注意 email就是客户的email地址,通过$consignee[]数组获取

    /* 增加是否给客户发送邮件选项 add by 68ecshop.com */
    if ($consignee['email'] != '')
    {
        $tpl = get_mail_template('order_confirm');
        $smarty->assign('order', $order);
        $smarty->assign('goods_list', $cart_goods);
        $smarty->assign('shop_name', $_CFG['shop_name']);
        $smarty->assign('send_date', date($_CFG['time_format']));
        $content = $smarty->fetch('str:' . $tpl['template_content']);
        send_mail($_CFG['shop_name'], $consignee['email'], $tpl['template_subject'], $content, $tpl['is_html']);
    }   

再试下,是不是您的网站下单可以发邮件了?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|小黑屋|全球服务器论坛

GMT+8, 2024-4-27 12:57 , Processed in 1.684803 second(s), 17 queries , File On.

Powered by Discuz! X3.5

Copyright © 2001-2024 Tencent Cloud.

快速回复 返回顶部 返回列表