Tuesday, 30 June 2015

Magento send mail load by template id

                        $post = array();
                        $post['customer'] = $finelurl;
                        $postObject = new Varien_Object();
                        $postObject->setData($post);
                        $emailTemplate  = Mage::getModel('core/email_template')->load(5); //Templated id Forgot Password
                       
                        $emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_general/name'));
                        $emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_general/email'));
                        $emailTemplate->setTemplateSubject('Password Reset Confirmation Hisconfe');
                        $emailTemplate->send($Secondaryemail, 'test', array('data' => $postObject));

No comments:

Post a Comment