Send Custom Template in Email magento
$templateId = 1;
$sender = array('name' => Mage::getStoreConfig('trans_email/ident_sales/name'),
'email' => Mage::getStoreConfig('trans_email/ident_sales/email'));
//recepient
$email = $order->getCustomerEmail(); // Customer Email
$emaiName = $order->getCustomerName(); // Customer Name
// Your dynamic variable
$vars = array();
$vars = array('name'=>$order->getCustomerName());
$storeId = Mage::app()->getStore()->getId();
$translate = Mage::getSingleton('core/translate');
Mage::getModel('core/email_template')->sendTransactional($templateId, $sender, $email, $emailName, $vars, $storeId);
$translate->setTranslateInline(true);
No comments:
Post a Comment