Magento没有发送忘记密码的电子邮件

时间:2012-02-08 11:28:01

标签: magento magento-1.5

当客户尝试重置密码时,Magento不会发送电子邮件。我知道Magento正在重置密码,但邮件只是没有发送

以下是我发送邮件的代码。请帮忙。

public function sendPasswordReminderEmail()
{
    $translate = Mage::getSingleton('core/translate');
    /* @var $translate Mage_Core_Model_Translate */
    $translate->setTranslateInline(false);

    $storeId = $this->getStoreId();
    if (!$storeId) {
        $storeId = $this->_getWebsiteStoreId();
    }

    Mage::getModel('core/email_template')
        ->setDesignConfig(array('area'=>'frontend', 'store'=>$storeId))
        ->sendTransactional(
            Mage::getStoreConfig(self::XML_PATH_FORGOT_EMAIL_TEMPLATE, $storeId),
            Mage::getStoreConfig(self::XML_PATH_FORGOT_EMAIL_IDENTITY, $storeId),
            $this->getEmail(),
            $this->getName(),
            array('customer'=>$this)
        );

    $translate->setTranslateInline(true);

    return $this;
}

1 个答案:

答案 0 :(得分:2)

我刚才在这里回答了类似的答案:https://stackoverflow.com/a/10810193/778669

总之;转到Admin > System > Configuration > Advanced > System > Mail Sending Settings并确保Disable Email Communications设置为No,这对我来说是个问题。