0

Can anyone help me to send transactional email through the custom module and its editable with transactional email in backend template?

I want to send transactional email but it's not working.

I have created below function to send email from transactional email.

        $translate = Mage::getSingleton('core/translate');
        $translate->setTranslateInline(false);
        $receverEmail=Mage::getStoreConfig('ultimo/education_email/education_sendemail');
        $custom_template=Mage::getStoreConfig('customer/account_share/custom_template');
        $custom_identity=Mage::getStoreConfig('customer/account_share/custom_identity');

         Mage::getModel('core/email_template')
        ->setDesignConfig(array('area' => 'frontend', 'store' => $storeId))
        ->sendTransactional(
            $custom_template,
            array('name' => $fromName,'email' => $fromEmail),  
            $receverEmail,
            null,
            array('name' => $params['person-name'],'email' => $params['person-email'],'school_name' => $params['school-name'],'school_address' => $params['school-address']));

        $translate->setTranslateInline(true);
0

Try it

    $storeId = Mage::app()->getStore()->getId();  

    $sender = array( 
      'name'  =>  $fromName,
      'email' =>  $fromEmail
    );

    $storeName = Mage::app()->getStore()->getName();

    $receverEmail = Mage::getStoreConfig('ultimo/education_email/education_sendemail', $storeId);

    $custom_template = Mage::getStoreConfig('customer/account_share/custom_template', $storeId);

    $custom_identity = Mage::getStoreConfig('customer/account_share/custom_identity',$storeId);


    $translate = Mage::getSingleton('core/translate');  

    $translate->setTranslateInline(false); 

    $data = array(
        'name' => $params['person-name'],
        'email' => $params['person-email'],
        'school_name' => $params['school-name'],
        'school_address' => $params['school-address']
    );

    Mage::getModel('core/email_template')->sendTransactional($custom_template, $sender, $receverEmail, $storeName, array('data'=>  $data), $storeId);

    $translate->setTranslateInline(true); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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