I copied email template from one of default magento email. and i am getting everything in email but css not being loaded in email.

        <test_email_template translate="label" module="dio">
            <label>Test Email Template</label>

below is controller code for calling email template.

$emailTemplate = Mage::getModel('core/email_template')->loadDefault('test_email_template');
$template_variables = array(
    'name' =>  'helllo',

$processedTemplate = $emailTemplate->getProcessedTemplate($template_variables);

try {
    $z_mail = new Zend_Mail('utf-8');
        ->addTo('[email protected]')
        ->setFrom('[email protected]', "tesing");
} catch (Exception $e) {

and this is my test_email_template.html file code.

{{template config_path="design/email/header"}}
{{inlinecss file="email-inline.css"}}

<table cellpadding="0" cellspacing="0" border="0">
        <td>{{var name}}</td>
{{template config_path="design/email/footer"}}

everything is working fine and i am getting email but css is not loading in email. is there any solution for that?

2 Answers 2


I have fixed that issue, We need to set design config after loading the email template.

$emailTemplate = Mage::getModel('core/email_template')->loadDefault('send_do_shipment_email');
                    'area' => 'frontend',
                    'store' => $storeId
  • Please specify where you have added this.
    – Max
    Dec 8, 2017 at 17:08

Try this:

Go to system->configuration->General->Design->Transactional emails then add your email-inline.css.

Non-inline CSS File(s) : email-non-inline.css,email-inline.css


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.