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 addC开发者_运维知识库C()....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);
}
精彩评论