Zen Cart Logo
Forums / General Questions / Customers not receiving "Password Forgotten" email

Customers not receiving "Password Forgotten" email

Views: 3,438

Results 1 to 20 of 25
10 Nov 2014, 3:55 AM
#1
t4gal avatar

t4gal

New Zenner

Join Date:
Nov 2014
Posts:
18
Plugin Contributions:
0

Customers not receiving "Password Forgotten" email

Hello,

My "Password forgotten" emails are not being received. I've created multiple customer accounts to test this, using hotmail, gmail, and two different paid email addresses. None of them are receiving the email with their new password (I've checked spam folders). The "Forgotten Password" page says it successfully sent the email, but it never arrives, although the password is being changed.

Every other zen-cart email is working fine. I am able to send direct emails from the admin and the "Welcome", "Order confirmation" and "Order Status Update" emails are all working fine.

My zen-cart is hosted with Godaddy, PHP Version: 5.4.31, Database: MySQL 5.5.36-cll-lve, it's a fresh install, I haven't installed any addons or plugins. I installed by uploading via FTP and running zc_install. The changes I've made to the site have mostly been to the css, with some other small changes in unrelated areas.

I've been googling this problem for hours and none of the solutions I've found on various forum posts and different help articles have worked.
What I've tried:

  • Modifying the wording and adding more detailed instructions to the "Password Forgotten" email to avoid it being caught by spam filters.
  • I've checked the forms action=" " address, and from what I've read it is correct.
  • I've contacted Godaddy to confirm that everything is set up properly with the email address I have set up in my "Email Options" settings.

I'm using SMTPAUTH and have double, triple and quadruple checked my SMTP settings, and based on everything I've read they are correct. I'm using a proper, paid-for email address for my email settings.

Any help is greatly appreciated, as I've tried everything I can find. I hope I've provided all of the necessary information, if not I apologize.

Thank you in advance for the help.

10 Nov 2014, 4:14 PM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Customers not receiving "Password Forgotten" email

t4gal:

Every other zen-cart email is working fine. I am able to send direct emails from the admin and the "Welcome", "Order confirmation" and "Order Status Update" emails are all working fine.

In theory, if all other emails are able to be sent/recieved the so should the forgotten passwords, so on this basis (and a process of elimination) if you load the file

/includes/functions/functions_email.php into a text editor you should find a line that reads:

$emodules_array[] = array('id' => 'password_forgotten', 'text' => 'Password Forgotten');

Try changing this to something like

$emodules_array[] = array('id' => 'password_forgotten', 'text' => 'Pass Reset');
(IOW, eliminate the text 'Password').

My theory/guess is that this could be triggering a filter rule somewhere and preventing the emails from being sent and are being silently discarded.

I will stress that this really is just a stab in the dark, and to be perfectly honest, I don't think it'll make a difference, but in the absence of any better ideas you don't have anything to lose by trying.

Cheers
RodG

10 Nov 2014, 6:02 PM
#3
t4gal avatar

t4gal

New Zenner

Join Date:
Nov 2014
Posts:
18
Plugin Contributions:
0

Re: Customers not receiving "Password Forgotten" email

I just gave that a try, but unfortunately it didn't solve my problem.

I appreciate the suggestion though.

10 Nov 2014, 7:10 PM
#4
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,085
Plugin Contributions:
56

Re: Customers not receiving "Password Forgotten" email

What is your admin setting for Configuration->E-Mail Options->Emails must send from known domain? aol, hotmail and possibly others instituted a change this summer such that if this setting is currently No, it might explain the lost/rejected emails.

10 Nov 2014, 9:44 PM
#5
t4gal avatar

t4gal

New Zenner

Join Date:
Nov 2014
Posts:
18
Plugin Contributions:
0

Re: Customers not receiving "Password Forgotten" email

Sorry, I should have mentioned that in the original post. I do have "Emails must send from known domain?" Set to "Yes".

20 Nov 2014, 9:32 PM
#6
t4gal avatar

t4gal

New Zenner

Join Date:
Nov 2014
Posts:
18
Plugin Contributions:
0

Re: Customers not receiving "Password Forgotten" email

Any other suggestions for me to try? I'm really stumped with this one.

21 Nov 2014, 1:14 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Customers not receiving "Password Forgotten" email

Are there any errors showing in your /logs/ folder? ref: http://www.zen-cart.com/content.php?124-blank-page (whether you're getting blank pages or not)

21 Nov 2014, 1:15 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Customers not receiving "Password Forgotten" email

RodG:

In theory, if all other emails are able to be sent/recieved the so should the forgotten passwords, so on this basis (and a process of elimination) if you load the file

/includes/functions/functions_email.php into a text editor you should find a line that reads:

$emodules_array[] = array('id' => 'password_forgotten', 'text' => 'Password Forgotten');

Try changing this to something like

$emodules_array[] = array('id' => 'password_forgotten', 'text' => 'Pass Reset');
(IOW, eliminate the text 'Password').

My theory/guess is that this could be triggering a filter rule somewhere and preventing the emails from being sent and are being silently discarded.

I will stress that this really is just a stab in the dark, and to be perfectly honest, I don't think it'll make a difference, but in the absence of any better ideas you don't have anything to lose by trying.

Cheers
RodGThat section of the code is actually largely unused, and has no bearing on this scenario.

21 Nov 2014, 1:17 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Customers not receiving "Password Forgotten" email

t4gal:

  • I've contacted Godaddy to confirm that everything is set up properly with the email address I have set up in my "Email Options" settings.
    Did they trace whether they ever even receive the email to their systems?

Since Zen Cart says "sent successfully", that means it encountered no fatal error or rejection message when attempting to hand off the email to the SMTP server. So, that means the failure happens after Zen Cart hands it off to them. Only they can tell you where it ends up.

21 Nov 2014, 11:27 PM
#10
t4gal avatar

t4gal

New Zenner

Join Date:
Nov 2014
Posts:
18
Plugin Contributions:
0

Re: Customers not receiving "Password Forgotten" email

Thank you for the replies.

DrByte:

Are there any errors showing in your /logs/ folder? ref: http://www.zen-cart.com/content.php?124-blank-page (whether you're getting blank pages or not)

There is nothing in my /logs/ folder.

DrByte:

Did they trace whether they ever even receive the email to their systems?

Since Zen Cart says "sent successfully", that means it encountered no fatal error or rejection message when attempting to hand off the email to the SMTP server. So, that means the failure happens after Zen Cart hands it off to them. Only they can tell you where it ends up.

I asked them about that when I called them, but they told me that zen-cart cannot send emails through the email account. Since I know little to nothing about how the emails really work, I accepted that answer. Perhaps I need to give them another call.

22 Nov 2014, 6:58 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Customers not receiving "Password Forgotten" email

t4gal:

  • I've contacted Godaddy to confirm that everything is set up properly with the email address I have set up in my "Email Options" settings.

I'm using SMTPAUTH and have double, triple and quadruple checked my SMTP settings, and based on everything I've read they are correct. I'm using a proper, paid-for email address for my email settings.
t4gal:

DrByte:

Did they trace whether they ever even receive the email to their systems?

Since Zen Cart says "sent successfully", that means it encountered no fatal error or rejection message when attempting to hand off the email to the SMTP server. So, that means the failure happens after Zen Cart hands it off to them. Only they can tell you where it ends up.
I asked them about that when I called them, but they told me that zen-cart cannot send emails through the email account. Since I know little to nothing about how the emails really work, I accepted that answer. Perhaps I need to give them another call.
When Zen Cart is set up to use SMTPAUTH it sends mail thru whatever account your SMTP credentials are set to.
So, if you've set your store to SMTPAUTH and those settings are for the mailbox on your GoDaddy account, then your Zen Cart is indeed sending thru your GoDaddy mailbox. And therefore they can trace the email.
If the rep you're talking to doesn't know what you're talking about, then ask for someone who does.

24 Nov 2014, 1:58 AM
#12
t4gal avatar

t4gal

New Zenner

Join Date:
Nov 2014
Posts:
18
Plugin Contributions:
0

Re: Customers not receiving "Password Forgotten" email

Thank you for clearing that up, I appreciate it.

I've called them again and spoken to three different people, none of which seemed to have any idea what I was talking about when I asked them to trace the email. Finally the last one said they're not allowed to view emails because of privacy issues. So it looks like I'm not going to get any help there.

I decided to try to reset each file that has anything to do with "password forgotten" back to the original that came with the zen-cart install, in case I accidentally messed with something along the way. So I did a search using the developer tools for "password_forgotten" and went through the list of files and compared the originals with my current files to check for any differences. There was only one that was different, so I tried reverting it to the original, but that didn't solve anything.
Would that search bring up every file that could affect this? Or are there other files I should check?

I really don't know where to go from here. I've tried everything I can think of.

Thank you for the suggestions.

24 Nov 2014, 2:48 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Customers not receiving "Password Forgotten" email

Perhaps try a different tactic.

Tell them something's wrong with their servers: they are dropping your mail instead of delivering it and you want to know why.

The server administrator doesn't have to read your mail in order to monitor its progress through their system. And if their system is dumping it for some reason (which we've established it is) then that fact will also be in the server's logs, so they should be able to see that as well.

24 Nov 2014, 3:58 AM
#14
t4gal avatar

t4gal

New Zenner

Join Date:
Nov 2014
Posts:
18
Plugin Contributions:
0

Re: Customers not receiving "Password Forgotten" email

Okay, I will call them again and try that.

They keep saying it has to be something in the websites scripting, since some of the emails are working and some aren't.

Heres something I found when checking the email myself. There is one place that says "Messages sent today: 3/250 (SMTP relays)". When I saw that, I tried sending a direct email from the admin to one of my customers, and that number went up from 2/250 to 3/250. So I tried the forgotten password form again, and it didn't go up. Does that tell you anything about where the problem is occurring?

24 Nov 2014, 4:18 AM
#15
t4gal avatar

t4gal

New Zenner

Join Date:
Nov 2014
Posts:
18
Plugin Contributions:
0

Re: Customers not receiving "Password Forgotten" email

I just did some searching around to try and find the server logs myself, and found the error logs for my hosting account. There are a bunch of these errors:

PHP Warning: sprintf(): Too few arguments in /includes/modules/pages/password_forgotten/header_php.php on line 62
PHP Warning: sprintf(): Too few arguments in /includes/modules/pages/password_forgotten/header_php.php on line 60

Those same errors are repeated over and over. This is what I have in those lines for that file:

Line 60:

$html_msg['EMAIL_MESSAGE_HTML'] = sprintf(EMAIL_PASSWORD_REMINDER_BODY, $new_password);

Line 62:

zen_mail($check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'], $email_address, EMAIL_PASSWORD_REMINDER_SUBJECT, sprintf(EMAIL_PASSWORD_REMINDER_BODY, $new_password), STORE_NAME, EMAIL_FROM, $html_msg,'password_forgotten');

Whats wrong with those lines?

Thank you again for all of the help.

24 Nov 2014, 5:27 AM
#16
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Customers not receiving "Password Forgotten" email

Check any modifications made to "/includes/languages/english/password_forgotten.php" (compare against the original file from Zen Cart). If not using english check the corresponding file for your language(s).

The above referenced error usually indicates the defined language string contains an error.

24 Nov 2014, 5:43 AM
#17
t4gal avatar

t4gal

New Zenner

Join Date:
Nov 2014
Posts:
18
Plugin Contributions:
0

Re: Customers not receiving "Password Forgotten" email

I'm using the original file from zencart.

24 Nov 2014, 1:43 PM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Customers not receiving "Password Forgotten" email

In your language files, what is EMAIL_PASSWORD_REMINDER_BODY defined as?

24 Nov 2014, 1:47 PM
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Customers not receiving "Password Forgotten" email

t4gal:

I decided to try to reset each file that has anything to do with "password forgotten" back to the original that came with the zen-cart install, in case I accidentally messed with something along the way. So I did a search using the developer tools for "password_forgotten" and went through the list of files and compared the originals with my current files to check for any differences. There was only one that was different, so I tried reverting it to the original, but that didn't solve anything.
Would that search bring up every file that could affect this? Or are there other files I should check?
How about all files with the word "password" in them?
The error about too few arguments suggests that maybe the attempt to generate a new password is failing, which suggests maybe you've altered the password encryption logic or you've got outdated code from older versions or outdated plugins still on your site.

24 Nov 2014, 4:41 PM
#20
t4gal avatar

t4gal

New Zenner

Join Date:
Nov 2014
Posts:
18
Plugin Contributions:
0

Re: Customers not receiving "Password Forgotten" email

DrByte:

In your language files, what is EMAIL_PASSWORD_REMINDER_BODY defined as?

This is in /includes/languages/english/password_forgotten.php

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" . ' %s' . "\n\nAfter you have logged in using the new password, you may change it by going to the 'My Account' area."); 

I will start checking through all of the files with "password" in them.

Thank you again for the help.