Php 无法使用magento 1.9.2社区版中的自定义模板发送电子邮件
大家好,我正在尝试使用自定义电子邮件模板在magento中发送电子邮件。但我有一个例外,我安装了SMTP Pro扩展 我在这里列出代码:- My config.xmlPhp 无法使用magento 1.9.2社区版中的自定义模板发送电子邮件,php,magento,magento-1.9,email-templates,magento-1.9.2.1,Php,Magento,Magento 1.9,Email Templates,Magento 1.9.2.1,大家好,我正在尝试使用自定义电子邮件模板在magento中发送电子邮件。但我有一个例外,我安装了SMTP Pro扩展 我在这里列出代码:- My config.xml <template> <email> <custom_abc_email_template module="custom_abc"> <label>Custom Template</label> <file>custom_
<template>
<email>
<custom_abc_email_template module="custom_abc">
<label>Custom Template</label>
<file>custom_abc_templates/customTemplate.html</file> // this specifies the path where the custom template is located
<type>html</type>
</custom_abc_email_template>
</email>
</template>
我的模板文件代码
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="action-content">
<h1>Custom Abc,</h1>
<p><strong>Your new password is:</strong> trolled</p>
<p>You can change your password at any time by logging into <a href="{{store url="customer/account/"}}">your account</a>.</p>
</td>
</tr>
</table>
在aschroder_smtppro.log中
2016-04-11T10:03:18+00:00 DEBUG (7): Email is not valid for sending,
this is a core error that often means there's a problem with your email templates.
在后端设置电子邮件
使用此模板
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="action-content">
<h1>Custom Abc,</h1>
<p><strong>Your new password is:</strong> trolled</p>
<p>You can change your password at any time by logging into <a href="{{store url='customer/account/'}}">your account</a>.</p>
</td>
</tr>
海关Abc,
您的新密码是:trolled
您可以通过登录随时更改密码
通过更改Magento系统电子邮件设置解决了相同的异常。 例外情况在插件的电子邮件模板代码中设置(见下文) 在管理中,从顶部菜单中选择系统->配置,然后转到系统-邮件发送设置。将“禁用电子邮件通信”设置为“否”
2016-04-11T10:03:18+00:00 DEBUG (7): Email is not valid for sending,
this is a core error that often means there's a problem with your email templates.
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="action-content">
<h1>Custom Abc,</h1>
<p><strong>Your new password is:</strong> trolled</p>
<p>You can change your password at any time by logging into <a href="{{store url='customer/account/'}}">your account</a>.</p>
</td>
</tr>
if (!$this->isValidForSend()) {
$_helper->log('Email is not valid for sending, this is a core error that often means there\'s a problem with your email templates.');
Mage::logException(new Exception('This letter cannot be sent.')); // translation is intentionally omitted
return false; }