简体   繁体   中英

magento transactional emails CC

is it possible to addcc on a magento transactional email?

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.

single email or array email is acceptable, check this out:

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);
    }  

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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