0
我無法使用我的自定義電子郵件模板發送郵件。無法在magento自定義模塊中發送交易電子郵件
我等/ config文件代碼
<template>
<email>
<quickrfq_email_enquiryadmintemplate translate="label" module="quickrfq">
<label>Admin Enquiery Form</label>
<file>enquiryadmin.html</file>
<type>html</type>
</quickrfq_email_enquiryadmintemplate>
</email>
</template>
我的控制器代碼發送郵件
$mailTemplate = Mage::getModel('core/email_template');
/* @var $mailTemplate Mage_Core_Model_Email_Template */
$mailTemplate->setDesignConfig(array('area' => 'frontend'))
->setReplyTo(Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT))
->sendTransactional(
Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE),
Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
Mage::getStoreConfig(self::XML_PATH_EMAIL_RECIPIENT),
null,
null
);
if (!$mailTemplate->getSentSuccess()) {
throw new Exception();
}
但我爲得到錯誤There has been an error processing your request
var/log中提到的錯誤是什麼? – Slimshadddyyy
異常'帶'消息'這封信不能發送。 – Zaheerabbas