Magento在注册后不会向雅虎账户发送电子邮件

时间:2014-06-26 16:36:49

标签: email magento gmail yahoo

我的magento网站有问题,我发现它发送邮件给gmail和hotmail而不是yahoo,控制页面的控制器是AccountController.php,它使用sendNewAccountEmail()函数,请求我帮你解决这个问题。

这是处理用户注册的代码

protected function _successProcessRegistration(Mage_Customer_Model_Customer $customer)
{
    $session = $this->_getSession();
    if ($customer->isConfirmationRequired()) {
        /** @var $app Mage_Core_Model_App */
        $app = $this->_getApp();
        /** @var $store  Mage_Core_Model_Store*/
        $store = $app->getStore();
        $customer->sendNewAccountEmail(
            'confirmation',
            $session->getBeforeAuthUrl(),
            $store->getId()
        );
        $customerHelper = $this->_getHelper('customer');
        $session->addSuccess($this->__('Account confirmation is required. 
        Please, check your email for the confirmation link. 
        To resend the confirmation email please <a href="%s">click here</a>.',
            $customerHelper->getEmailConfirmationUrl($customer->getEmail())));
        $url = $this->_getUrl('*/*/index', array('_secure' => true));
    } else {
        $session->setCustomerAsLoggedIn($customer);
        $session->renewSession();
        $url = $this->_welcomeCustomer($customer);
    }
    $this->_redirectSuccess($url);
    return $this;
}

感谢。

1 个答案:

答案 0 :(得分:0)

这很可能不是代码问题,可能是电子邮件递送问题。您是通过自己的服务器发送这些电子邮件吗?如果是这样,可能需要确保一些事情到位。

查看有关Yahoo!的帖子邮件传递问题,可能与您的问题有关: http://marketingland.com/email-senders-stymied-yahoo-mail-79442