I have created a transactional email template and sending mail using below code :

$to_user_email = 'test@gmail.com';
$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')

From above code email sent to $to_user_email but cc not sent to 'test1@gmail.com', 'test2@gmail.com'.

How to send cc or bcc to multiple email address?

  • How to configure mail in magento
    – Gem
    Jul 22, 2016 at 5:12

2 Answers 2


Use below code:

$mail = Mage::getModel('core/email_template');
    ->setDesignConfig(array('area' => 'frontend', 'store' => $storeId))
    ->sendTransactional($templateId, $sender, $useremail, $emailName, $vars, $storeId);
  • Hello @Prashant Valanda, where you set My Template transactional email template? Jul 22, 2016 at 5:01
  • Instead of $templateId you need to pass your template Jul 22, 2016 at 5:04
  • I have tried this code but no email sent to $useremail and also not sent to cc/bcc email address. Jul 22, 2016 at 5:24
  • nice to hear it is working for you.If it helps you mark as accepted for further use. Jul 22, 2016 at 5:43

Please check below code

                $emailTemplateId='Youe email temlate';
                //Multiple BCC email address
                //Multiple CC email address
                $sender = Array('name' => 'test','email' => 'test@domain.com');
                $mailSubject='Your subject';
                $vars = Array('name' => 'Your message');

                    ->sendTransactional($emailTemplateId, $sender, $email, null, $vars, $storeId);

Your Answer

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

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