I am creating a custom module in Magento which send emails. I've created the email template in the "transactional email templates" section in the backend, and it works.

Now I would like to add the email template in the files of Magento to have a durable solution (currently, if I reset the database configuration, my template will be removed). I can't find a way to load the template.

  1. I've created my template file in app/locale/en_GB/template/email/notification.html
  2. I've tried to declare this template in my config.xml

            <vendor_report_notification_email_template translate="label" module="namespace_ordersReport">
                <label>Vendor Report Notification Template</label>

I can't find how to add an email template and how to load it to 1. be able to send an actual email, 2. customize it in the backend if needed through the load template function of the transactional emails.

  • Since you have placed your template in en_GB then your store should be en_GB too I guess. Hope you know this already. Jun 24, 2015 at 11:55
  • Yes, my store is configured with en_GB as locale
    – chris
    Jun 24, 2015 at 12:15
  • Did you manage to resolve your issue? Jun 25, 2015 at 10:50

2 Answers 2


You will need to add some fields to the system.xml

<!-- sender -->
<sender_email_identity translate="label">
    <label>Email Sender</label>

<!-- template -->
<email_template translate="label">
    <label>Email Template</label>

And retrieve and set the data where ever you want to send it from

$templateData = new Varien_Object();
    'varname' => 'value',
    'varname' => 'value',

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

$mailTemplate = Mage::getModel('core/email_template');
$mailTemplate->setDesignConfig(array('area' => 'frontend'))
        '[email protected]',
        array('data' => $templateData)

if (!$mailTemplate->getSentSuccess()) {
    throw new Exception();


You will need to mention it in your system.xml in order to having that functionality.

Check this page.

Your Answer

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

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