my custom transactional email is not loading image for header and footer. i am sending the mail through observer other email are working perfectly only the observer email not loading header and footer properly.

$emailTemplate  = Mage::getModel('core/email_template')
                $emailTemplate->setTemplateSubject('Make a Review');  
                $emailTemplateVariables = array();
                $emailTemplateVariables['test'] = $companyinfo->getCompanyName();
                $emailTemplateVariables['name'] = $order->getCustomerFirstname().' '.$order->getCustomerLastname();
                $emailTemplateVariables['reviewurl'] = Mage::getUrl('test/index/review',array('ref' => $ref));

                $processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
                $emailTemplate->send($email,$order->getCustomerFirstname().' '.$order->getCustomerLastname(), $emailTemplateVariables);
  • Check Preview of template review_template in admin Transactional Emails section Nov 23 '15 at 7:37
  • preview is showing perfect but when i send it is not loading header and footer images.. Nov 23 '15 at 7:43
  • check image loading for your mail is allowed in your mail client. if this is the case with loading images..... Nov 23 '15 at 7:51
  • working for other email but not loading the email that are send from observer. Nov 23 '15 at 7:53
  • set area that might be creating isssue Nov 23 '15 at 8:00

setting the setDesignConfig and area to frontend solved my problem.

$emailTemplate  = Mage::getModel('core/email_template')
                ->setDesignConfig(array('area' => 'frontend', 'store' => $store->getId()));  
            $emailTemplate->send($email,$order->getCustomerFirstname().' '.$order->getCustomerLastname(), $emailTemplateVariables,$storeId=null);

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.