Pergunta

The way I use it (Magento EE 1.12):

    $transactional = Mage::getModel('core/email_template');

    foreach($ccEmails as $ccEmail) {
        $transactional->addBcc(trim($ccEmail));
    }

    try{

        $transactional->sendTransactional($transactionalTemplateId, $sender, $recipientEmail, $recipientName, $vars, $storeId);

    } catch(Exception $e) {

        throw $e;

    }
Foi útil?

Solução

Actually, nevermind, it's not a Magento bug. I've debugged it and it turns out that Ebizmarts_Mandrill_Model_Email_Template has extended the addBcc method, but doesn't add it to the Zend_Mail instance (which Mage_Core_Model_Email_Template does).

I've emailed ebizmarts support with the fix:

The addBcc method in app/code/community/Ebizmarts/Mandrill/Model/Email/Template.php should have the following code added right after the function declaration:

    //Check if should use Mandrill Transactional Email Service
    if(FALSE === Mage::helper('mandrill')->useTransactionalService()){
        return parent::addBcc($bcc);
    }

Otherwise bcc will not be set in the Zend_Mail instance when the send method is called in Mage_Core_Model_Email_Template.

For now, I've created a module that rewrites and extends the Mandrill module and overrides the addBcc method.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a magento.stackexchange
scroll top