电子邮件模板Magento不起作用

问题描述 投票:0回答:2

当有人通过magento中的联系表单向我发送电子邮件时,电子邮件到达时没有布局,它只显示整个布局代码。

应该是这样的:

已通过联系表单发送消息,

消息:

尊敬的先生/女士来自联系人的留言


Comes in like this:
<!--@vars
{"var data.name":"Sender Name",
"var data.email":"Sender Email",
"var data.telephone":"Sender Telephone",
"var data.comment":"Comment"}
@-->

<div style="font:11px/1.35em Verdana, Arial, Helvetica, sans-serif;">
<table cellspacing="0" cellpadding="0" border="0" width="98%" style="margin-top:10px; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; margin-bottom:10px;">
<tr>
<td align="center" valign="top">
<!-- [ header starts here] -->
<table cellspacing="0" cellpadding="0" border="0" width="650">
<tr>
<td valign="top">
<a href="http://www.mijndomeinnaam.nl/"><img src="http://www.mijndomeinnaam.nl/skin/frontend/default/grayscale/images/logo_email.gif" alt="omschrijving logo" style="margin-bottom:10px;" border="0"/></a></td>
</tr>
</table>

<!-- [ middle starts here] -->
<table cellspacing="0" cellpadding="0" border="0" width="650">
<tr>
<td valign="top">
<p><strong>Er is een bericht verstuurd via het contactformulier</strong>,</p>
<ul>
<li>Naam: Jan</li>
<li>E-mail: [email protected]</li>
<li>Telefoon: nvt</li>
</ul>

<p><strong>Bericht:</strong></p>
<p>Beste meneer/mevrouw

Het bericht van de persoon die contact op heeft genomen

</p>
</td>
</tr>
</table>

</td>
</tr>
</table>
</div>

如何解决这个问题?

email magento
2个回答
1
投票

在您的magento数据库中,转到“core_email_template”表。在“template_type”列中,更改“2”的值。 (将此选项应用于将此列设置为“1”的所有字段,或应用于要设置为HTML的所有字段,而不仅仅是文本)

这样做,您说这个电子邮件模板是HTML类型而不是文本。我希望它有效。


2
投票

在app / code / core / Mage / Contacts / etc / config.xml中

更改

       <email>
            <contacts_email_email_template translate="label" module="contacts">
                <label>Contact Form</label>
                <file>contact_form.html</file>
                <type>text</type>
            </contacts_email_email_template>
        </email> 

       <email>
            <contacts_email_email_template translate="label" module="contacts">
                <label>Contact Form</label>
                <file>contact_form.html</file>
                <type>html</type>
            </contacts_email_email_template>
        </email> 

那就是:html而不是文本

© www.soinside.com 2019 - 2024. All rights reserved.