Email not arriving when using 'forgotten your password' link

4 views
Skip to first unread message

Sam Collett

unread,
Nov 6, 2009, 12:32:52 PM11/6/09
to Pixie
I have recently moved Pixie onto a Windows 2008 host and discovered
that when I use the forgotten password link, the email never arrives
after I submit the form.

Through trying to find a solution, it looks like this is because it is
not 'From' the same domain as the website (since it never arrives, I
have no idea what 'From' is set to, probably localhost).

If anyone has this problem, it should be a simple fix. This is what
works for me:

After line 35 of admin/admin/modules/mod_login.php put in the
following:

$headers = "From: postmaster@{$_SERVER['HTTP_HOST']}"."\r\n".
"X-Mailer: PHP/" . phpversion();

The change the next line to:

mail($email, $subject, $emessage, $headers);

The email should then arrive.

Is anyone able to test this to see if it works for those that didn't
have the problem in the first place, just to see if this breaks
anything?

--Sam

rm

unread,
Nov 6, 2009, 12:46:47 PM11/6/09
to Pixie
I am testing locally only, and though mail delivery was not a problem
prior, your change did not break anything on my setup either after I
made it. So, in my case, it is benign.

Scott

unread,
Nov 14, 2009, 3:48:46 PM11/14/09
to Pixie
Agreed. This change will help improve compatibility across a number of
hosts - some servers cannot send email without this header. I think we
have seen this before at some point.

Scott
Reply all
Reply to author
Forward
0 new messages