代码之家  ›  专栏  ›  技术社区  ›  Rakward

Magento电子邮件模板位置?

  •  3
  • Rakward  · 技术社区  · 15 年前

    我一直试图从我的magento模块发送电子邮件,但由于某些原因,我无法使模板正常工作:

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

    邮件头和所有邮件都已正确发送。

    我创建了一个名为 应用程序状态_电子邮件.html 在里面 应用程序/区域设置/英语/模板/电子邮件 管理面板上选择的语言是英语(美国)。思想?

    模板本身只包含:

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

    但由于某些原因,我的邮件没有任何内容。我有另一个模块发送电子邮件,但从前端威奇工程罚款,与模板位于同一个文件夹。。。

    1 回复  |  直到 15 年前
        1
  •  5
  •   Joe Mastey    15 年前

    请记住将电子邮件模板添加到配置文件:

    <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>
    

    希望有帮助!

    谢谢, 乔

    推荐文章