I have created a transactional email template and sending mail using below code :
$to_user_email = '[email protected]'; $to_user = 'test'; $emailTemplate = Mage::getModel('core/email_template')->loadByCode('My Template'); $senderName = Mage::getStoreConfig('trans_email/ident_support/name'); $senderEmail = Mage::getStoreConfig('trans_email/ident_support/email'); $sender = array('name' => $senderName, 'email' => $senderEmail); $store = Mage::app()->getStore()->getId(); // Set variables that can be used in email template $vars = array(); $vars['order_id'] = 'order_id'; $vars['content'] = 'content'; $processedTemplate = $emailTemplate->getProcessedTemplate($vars); $mail = Mage::getModel('core/email') ->setToName($to_user) ->setToEmail($to_user_email) ->setBody($processedTemplate) ->setSubject('Subject') ->setFromEmail($senderEmail) ->setFromName($senderName) ->setType('TEXT') ->setCc(array('[email protected]','[email protected]')); $mail->send(); From above code email sent to $to_user_email but cc not sent to '[email protected]', '[email protected]'.
How to send cc or bcc to multiple email address?