2010-09-10 123 views
3

我一直在試圖從我的Magento模塊發送一封電子郵件,但由於某種原因,我不能得到的模板的工作:Magento電子郵件模板位置?

模板設置如下:

$emailTemplate = Mage::getModel('core/email_template')->loadDefault('application_status_email'); 

頁眉和所有正在發送正確。

我在應用程序/區域/ EN_US /模板/電子郵件創建了一個名爲application_status_email.html文件和管理面板上所選擇的語言爲英語(美國)。思考?

模板本身只包含:

<div> 
Message: 
{{var message}} 
</div> 

但由於某些原因我的電子郵件都沒有什麼內容發送。我還有一個模塊發送電子郵件,而是從前端至極正常工作,與位於同一文件夾中的模板......

回答

5

記住您的電子郵件模板添加到配置文件:

<global> 
    <template> 
    <email>                 
     <application_status_email> 
     <label>Application Status Message</label> 
     <file>application_status_email.html</file> 
     <type>html</type> 
     </application_status_email> 
    </email> 
    </template> 
</global> 

希望這有幫助!

謝謝, 喬

+0

哎,關當然,我還是不習慣woth Magento的XML文件。謝謝。 – Rakward 2010-09-13 06:46:40