One Magento Installation
Two websites on subdomains

Customer1 subscribes to sub1.xxxxxxx.com.
Email address is in database and customer can login with the same credentials to sub2.xxxxxxx.com.

In Store Email Addresses, sender email address are different in each website for “CustomerSupport” sender name. eg [email protected] and [email protected]

When Customer1 tries to login to sub2.xxxxxxx.com and forget his password, Password Reset Confirmation email is coming from [email protected] instead of [email protected] and mail comes in spam folder.

Any suggestions ?

1 Answer 1


I can explain why this happens, but I don't have a full solution.
The password reminder e-mail is send through this method from the customer model

public function sendPasswordReminderEmail()
    $storeId = $this->getStoreId();
    if (!$storeId) {
        $storeId = $this->_getWebsiteStoreId();

        array('customer' => $this), $storeId);

    return $this;

What's important here is the $storeId variable.
it is determined like this:
If the customer is associated to a store view other than the admin then that store id is used.
So if you have 2 store views and the customer registered in store 1, then this e-mail will be received from store 1 even if he requests a new password from the second one.

If the customer is associated to the admin store then _getWebsiteStoreId will identify the default Store and use that one.

So what you can do here is to try to modify the method mentioned above and replace

$storeId = $this->getStoreId();


$storeId = Mage::app()->getStore()->getId(); //get current store
if (!$storeId) { //if one admin store use the customer's prefered store
     $storeId = $this->getStoreId();

I'm not sure this will work or the side effects it has, but you can give it a try.

  • I replaced code as above in code/local/Mage/Customer/Model/customer.php and still have the same result @Marius Dec 18, 2014 at 11:42
  • I thought it might now work. You can at least start to debug from the code I mentioned
    – Marius
    Dec 18, 2014 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.