【发布时间】:2018-04-12 13:14:55
【问题描述】:
我正在尝试使用以下代码发送恢复电子邮件。 但它从不发送电子邮件?有什么建议吗? 我使用的是 1.9 版本的 magento。
if ($customer->getId())
{
try
{
$newResetPasswordLinkToken = Mage::helper('customer')->generateResetPasswordLinkToken();
$customer->changeResetPasswordLinkToken($newResetPasswordLinkToken);
$customer->save();
$customer->sendPasswordResetConfirmationEmail();
}
catch (Exception $exception)
{
}
}
【问题讨论】:
-
你有cron jobs enabled and configured吗?如果是,请运行
SELECT * FROM core_email_queue;并查看您的电子邮件是否已添加到队列中。 -
感谢您的建议,我已经安装了邮件服务器和cron。之后,它可以成功运行。但是现在我遇到了新的情况,发送的订单邮件没有从 core_email_queue 中清除。邮件被处理后肯定过了几天,但没有被删除。
标签: magento magento-1.9 reset-password