简体   繁体   English

magento 交易电子邮件 CC

[英]magento transactional emails CC

is it possible to addcc on a magento transactional email?是否可以在 magento 事务 email 上添加cc?

I know I can getMail() to return a Zend_Mail object which I can then addCC()....But that doesn't appear to actually attach my extra email address.我知道我可以 getMail() 返回 Zend_Mail object 然后我可以 addCC()....但这似乎并没有实际附加我额外的 email 地址。

single email or array email is acceptable, check this out:单个 email 或数组 email 是可以接受的,看看这个:

app\code\core\Mage\Core\Model\Email\Template.php app\code\core\Mage\Core\Model\Email\Template.php

Mage_Core_Model_Email_Template

public function addBcc($bcc)
{
    if (is_array($bcc)) {
        foreach ($bcc as $email) {
            $this->getMail()->addBcc($email);
        }
    }
    elseif ($bcc) {
        $this->getMail()->addBcc($bcc);
    }
    return $this;
}

Try this,no need to overwrite the core modules试试这个,不需要覆盖核心模块

 try{
      $mail = Mage::getModel('core/email_template');
      $mail->getMail()->addCc('abc@gmail.com');  

      $mail->sendTransactional($templateId, $sender, $recepientEmail, $recepientName, $vars, $storeId);
    }
    catch(Exception $e){
        print_r($e);
    }  

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM