0

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;

    }

1 Answer 1

2

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.

4
  • Can you set your awnser as the awnser that solved the bug? Commented Apr 12, 2013 at 7:52
  • 2
    Does it work as expected? As far as I know, Zend_Mail::addBcc() is bugged and adds email to "To" field too framework.zend.com/issues/browse/ZF-8723 and therefore useless. Commented Apr 12, 2013 at 9:42
  • answering one's own question can only be done after 2 days @SanderMangel Commented Apr 12, 2013 at 12:43
  • @Zyava, interesting, it does seem to work for me, I can't see the other recipients when looking at the email in Gmail, but then again, the server is using Linux, and the bug only seems to happen on Windows..
    – Erfan
    Commented Apr 15, 2013 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.