Forums / General Questions / Customer password reset email not arriving

Customer password reset email not arriving

Views: 3,932

Results 1 to 11 of 11
16 Aug 2012, 9:54 PM
#1
rhs49010 avatar

rhs49010

New Zenner

Join Date:
Aug 2012
Posts:
7
Plugin Contributions:
0

Customer password reset email not arriving

I need to find a way to fix the customer password reset.
After submitting an email the message says new password sent to your email address.
But it never arrives, for me or anyone else.
I have email archives and the email isn't in the archives.
All the other email functions work fine.
And I know how to manually replace the password.
I just want to fix this glitch, so I don't have to go through this manually every time.
I'm may be loosing customer over this.

19 Aug 2012, 3:48 AM
#2
rhs49010 avatar

rhs49010

New Zenner

Join Date:
Aug 2012
Posts:
7
Plugin Contributions:
0

Re: Customer password reset email not arriving

I need to find a fix for the customer password reset function.
The email reset message reads your new password has been sent to your email address.
But the email never arrives, for me or anyone else.
I know how to manually reset the password.
Can anyone help me out with this glitch?
I don't want to manually reset every ones password all the time.
Every thing else works fine.
This kind of thing turns off customers.

22 Aug 2012, 1:36 AM
#3
rhs49010 avatar

rhs49010

New Zenner

Join Date:
Aug 2012
Posts:
7
Plugin Contributions:
0

Re: Customer password reset email not arriving

Will this help find the problem?
sprintf() [<a href='function.sprintf'>function.sprintf</a>]: Too few arguments

22 Aug 2012, 2:20 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,514
Plugin Contributions:
176

Re: Customer password reset email not arriving

rhs49010:

After submitting an email the message says new password sent to your email address.
But it never arrives, for me or anyone else.I can't seem to recreate the symptoms, using several different webservers. So that leaves me with the assumption that the problem isn't with Zen Cart directly, but rather most likely with the email engine handling the delivery.
rhs49010:

I have email archives and the email isn't in the archives.password-reset emails will not show in the Zen Cart email archives, because the customer's password is nobody's business but the customer's, and so archiving them would serve no smart business benefit.
rhs49010:

All the other email functions work fine.Okay, so if other emails are being delivered fine, then something must be suspect with those specific emails, either something broken in the code on your site vs the original Zen Cart code, or something your webserver's mail engine doesn't like about them, or something the recipient's mailserver doesn't like about them.
So, start by getting your hosting company to follow the email as it arrives from your store into the mailserver and then out of the mailserver. If it's not arriving after it leaves your site's mailserver, then perhaps it's getting trapped as spam on the other end.
Lots of tips on minimizing email delivery problems mentioned in these two articles:
http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Email_Problems
http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Understanding_Causes_Of_Lost_Emails
rhs49010:

And I know how to manually replace the password.
I just want to fix this glitch, so I don't have to go through this manually every time.What do you mean by "every time"? Do you get 100 requests for this every day?
rhs49010:

Will this help find the problem?
sprintf() [<a href='function.sprintf'>function.sprintf</a>]: Too few arguments
Maybe. Maybe not. Without knowing the context from where you found that, along with the rest of the message which you stripped out, it's impossible to answer one way or the other.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Aug 2012, 4:25 AM
#5
rhs49010 avatar

rhs49010

New Zenner

Join Date:
Aug 2012
Posts:
7
Plugin Contributions:
0

Re: Customer password reset email not arriving

sprintf() [<a href='function.sprintf'>function.sprintf</a>]: Too few arguments in /home1/ecosolu1/public_html/alittledigital/art/includes/modules/pages/password_forgotten/header_php.php on line 45

This is in the cache file.

22 Aug 2012, 5:17 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,514
Plugin Contributions:
176

Re: Customer password reset email not arriving

Okay, there are two parts to that:

a) the line mentioned in the error message:```
$html_msg['EMAIL_MESSAGE_HTML'] = sprintf(EMAIL_PASSWORD_REMINDER_BODY, $new_password);


sprintf() requires 2 or more parameters: the first is the text pattern, and the rest are the values to be substituted into the pattern.

b) the pattern is defined in the constant declared in the password_forgotten.php language file:```
define('EMAIL_PASSWORD_REMINDER_BODY', 'A new password was requested from ' . $_SERVER['REMOTE_ADDR']  . '.' . "\n\n" . 'Your new password to \'' . STORE_NAME . '\' is:' . "\n\n" . '   [B]%s[/B]' . "\n\nAfter you have logged in using the new password, you may change it by going to the 'My Account' area.");
```You can see there that there is only one replacement mentioned in the pattern, denoted by **%s**.

So, if your site is dying on line 45 as mentioned in the error message you quoted, then that tells me that EMAIL_PASSWORD_REMINDER_BODY isn't defined correctly, or isn't defined at all. 

If you've gone into that file and edited the text to say something else, and in that editing process you decided to delete the %s, then it's not surprising that you'd get an error.

Or, if you've done other things to your site that tamper with the functions used to generate a value which is stored in the $new_password variable (esp the code in the functions_general.php file), then that could also cause similar problems. Installing addons that are not compatible with your version of Zen Cart could cause that. Or failed uploads resulting in incomplete functions files could also cause it. These kinds of things are outlined in the various FAQ articles dealing with troubleshooting problems, including the one you've apparently seen about blank pages and debug logs: <http://www.zen-cart.com/content.php?124-blank-page>


So, this leads me to this basic guide to finding out what's wrong: compare your site's files against the original files, and fix whatever was changed incorrectly: <http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Aug 2012, 1:18 PM
#7
rhs49010 avatar

rhs49010

New Zenner

Join Date:
Aug 2012
Posts:
7
Plugin Contributions:
0

Re: Customer password reset email not arriving

Okay, thanks for your help!
I'll look into that.
I did just move this site from another host, maybe something was lost in the move.
Thanks again.

22 Aug 2012, 3:01 PM
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,861
Plugin Contributions:
18

Re: Customer password reset email not arriving

rhs49010:

I did just move this site from another host, maybe something was lost in the move.:shocking:This should have been mentioned in your original post. It's one of the things mentioned in the posting tips.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

23 Aug 2012, 5:51 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,514
Plugin Contributions:
176

Re: Customer password reset email not arriving

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Aug 2012, 2:00 PM
#10
rhs49010 avatar

rhs49010

New Zenner

Join Date:
Aug 2012
Posts:
7
Plugin Contributions:
0

Re: Customer password reset email not arriving

Thank you for all your help.

The problem must have something to do with the database, I used an older copy from before the move just to see what would happen and every thing works including the customer password reset email.

And after I replace it with the newest data, (the one I made just for the move) the reset email stops working.

I don't get it, what does the database have to do with that?

24 Aug 2012, 1:28 AM
#11
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Customer password reset email not arriving

Email settings are stored in the database!
When you load a different database you load whatever email settings are in that database.