发送电子邮件(状态)的副本prestashop 1.7.2

时间:2018-11-19 09:50:46

标签: email copy prestashop

请如何设置向管理员复制电子邮件的状态(已完成订单,付款,..)?

1 个答案:

答案 0 :(得分:0)

从类send()覆盖函数Mail

设置$bcc参数并调用父函数:

 public static function send(
        $idLang,
        $template,
        $subject,
        $templateVars,
        $to,
        $toName = null,
        $from = null,
        $fromName = null,
        $fileAttachment = null,
        $mode_smtp = null,
        $templatePath = _PS_MAIL_DIR_,
        $die = false,
        $idShop = null,
        $bcc = null,
        $replyTo = null,
        $replyToName = null
    ) {

    $bcc = 'your@mail.com';
    parent:: send($idLang, $template, $subject, $templateVars, $to, $toName, $from, $fromName, $fileAttachment, $mode_smtp, $templatePath, $die, $idShop, $bcc, $replyTo, $replyToName);
}