This is my code that is working fine when I'm sending it to one recipient, i.e if I'm using 'rec1@gmail.com'
(single email) it is working fine. However I want to include the second email id as well rec2@gmail.com
and writing code like this: 'rec1@gmail.com,rec2@gmail.com'
but this is not working.
Let me know how can I implement this functionality ?
$templateId = 1;
$sender = array(
'name' => 'swapnesh',
'email' => 'sender@gmail.com'
);
$store = Mage::app()->getStore();
$vars = array(
'my_var' => 15,
'another_var' => 12
);
$translate = Mage::getSingleton('core/translate');
// Send your email
Mage::getModel('core/email_template')->sendTransactional(
$templateId,
$sender,
'rec1@gmail.com,rec2@gmail.com',
'Recipient Name',
$vars,
$store->getId()
);
$translate->setTranslateInline(true);