【问题标题】:Forgot password not sending email忘记密码不发邮件
【发布时间】:2012-02-13 22:34:33
【问题描述】:

想知道你是否可以帮助我。我安装了 Magento,当客户选择“忘记密码”时,系统不会发送重置密码电子邮件。

所有其他电子邮件都工作正常。我已经设置了新密码模板并在 Magento 的管理员中分配了它。

我这辈子都想不通为什么只有重置密码电子邮件没有发送,而其他邮件却没有发送。

请帮忙。

谢谢, EV

【问题讨论】:

  • 是的,里面什么都没有。

标签: magento magento-1.5


【解决方案1】:

要解决这个问题,删除 app/design/frontend///layout/ 中主题使用的自定义 customer.xml 就足够了,因此基本主题附带的默认布局(在 app/design/frontend/base/ default/layout/customer.xml) 将被使用。

或者可以更新自定义 customer.xml 以包含以下部分:

<customer_account_resetpassword translate="label">
    <label>Reset a Password</label>
    <remove name="right"/>
    <remove name="left"/>

    <reference name="head">
        <action method="setTitle" translate="title" module="customer">
            <title>Reset a Password</title>
        </action>
    </reference>
    <reference name="root">
        <action method="setTemplate">
            <template>page/1column.phtml</template>
        </action>
        <action method="setHeaderTitle" translate="title" module="customer">
            <title>Reset a Password</title>
        </action>
    </reference>
    <reference name="content">
        <block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>
    </reference>
</customer_account_resetpassword>

【讨论】:

    【解决方案2】:

    查看app/code/core/Mage/Customer/controllers/AccountController.php 文件。寻找forgotPasswordPostAction。逐步分析它 - 检查$this-&gt;getRequest()-&gt;getParams() 是否为您提供电子邮件地址,检查它是否验证(可能对验证代码进行了一些本地更改)。查看密码生成代码 - 是否生成了新密码?查看Mage_Customer_Model_Customer 类和sendPasswordReminderEmail 方法并尝试跟踪其中的错误。打印所有可以到达的值(电子邮件、名称、存储配置并检查异常和警告——打开 php 错误显示!)。

    这应该可以帮助您追踪问题,并收集足够的数据来识别它。

    【讨论】:

    • 谢谢,现在就去做。将恢复
    • 所有变量都显示出来了。姓名,电子邮件,storeid,新密码。找不到错误,所有代码都是标准 Magento。
    猜你喜欢
    • 2020-09-23
    • 2016-08-31
    • 2012-02-29
    • 1970-01-01
    • 1970-01-01
    • 2011-02-19
    • 2014-08-11
    • 2015-10-21
    • 2015-04-17
    相关资源
    最近更新 更多