URL to your eFiction: http://www.twilighted.net
Version of eFiction: 3.5
Have you bridged eFiction, if so with what?: N/A
Version of PHP: 5.2.8
Version of MySQL: 5.0.67
Have you searched for your problem: yes
If so, what terms did you try: Lost password, Password sent: No, lostpassword
State the nature of your problem:
It happens to a very small percentage of users when they go to the lost password page. They'll put in their e-mail address and will get the following error back:
"The email could not be sent. Please contact the administrator to report this problem."
I'll check the action log and it will confirm this with:
"username requested a new password. Password sent: No.
I've been trying to correlate it with a domain or anything, but the email addresses appear to have nothing in common with each other. For example, the most recent was a gmail address. I can't find anything unusual in my log files (ie: maillog) and when I am on the box itself, I can manually send email to her address, so my thinking was that sendmail seems to be working properly. I've been looking through the code for any kind of qualifiers that it would check against e-mail addresses but can't find any, I'm in no way an expert in coding of course. Does eFiction try to validate email addresses internally before sending it off to sendmail?
Any help would be greatly appreciated! π
The only instances I've seen of the log saying the email failed to send are when the email addresses themselves are bad: ie. email@yahoo, or just plain no @ sign, stuff like that. Because of that I think in the past that it didn't really try to validate the email addresses at all; however, I think in one of the more recent versions that it's at least doing some kind of validation when the user creates/edits a profile. I know that if I went to edit a bad one and tried to save it without changing it, it doesn't always let me. It might just be looking for the format email@domain.com or something like that.
Of course, that doesn't really help your current issue. You're using sendmail, you say, so the email settings section of the settings options is blank, right? (Gotta start with the most simple.)
Thanks for the reply, I appreciate that. π You're correct, just using good old sendmail so the mail settings are just left blank. I'm not sure it's even making it to sendmail though, because I can't find anything in the logs that are either accepting or rejecting the email addresses, that's why my guess was there was some pre-qualifier in eFiction, but again, I'm no expert. π
There is not a prequalifier in efiction.
Hmmm.. very odd. I thought maybe it might be a permissions issue, but then it wouldn't work for anyone.
I also just changed from using sendmail on my local server to an outside stmp realy that I run. Same exact results. Works for my email address when I test, but not for the one(s) in question. Very odd.
Also, when I go through the MTAs manually, the emails get sent without issue.
I do have a stupid question. What would trigger that error message in eFiction from sendmail? I mean, what instances would that error message result in eFiction reporting it? Not being able to talk to sendmail, etc? I'll dig some more in my logs, maybe I missed something. It just seems since I can reproduce the issue using two different servers, it may point to a glitch elsewhere. Perhaps a false negative or something.
For the email addresses in question, ask them to check their spam folders. Sometimes it gets marked that way.
If some emails are working and some aren't, then it isn't a problem with eFiction or with sendmail (or SMTP). There really isn't much we can do but help you pinpoint the problem. If the checking the spam folders yields no results, then you may want to contact your host. They may have some ideas.
Not really an issue with spam folders, because eFiction isn't sending the email because of the error it's reporting. Valid email though, as I can send it manually from my box, and I am my own host, I own the linux server. π Do you know what triggers the error ""The email could not be sent. Please contact the administrator to report this problem."" in eFiction? I mean, what would make eFiction report that error? It's not an error that it's getting from sendmail as there's nothing in my logs, so there has to be something else that is causing that trigger _EMAILFAILED, I just don't know what. I'm looking something like "if $THIS happens, echo ""The email could not be sent. Please contact the administrator to report this problem."". I'm looking in lostpassword.php. I'm just looking for what $THIS is. LOL!
I did find this:
if($result) {
$output .= write_message(_PASSWORDSENT);
dbquery("UPDATE ".substr(_AUTHORTABLE, 0, strpos(_AUTHORTABLE, "as author"))." SET password='$encryppass' WHERE uid = '".$uid."'");
}
else $output .= write_message(_EMAILFAILED);
What is $result looking for?
$result = sendemail($penname, $_POST['email'], $sitename, $siteemail, $subject, $mailtext, "html");
It's wanting it to return true, so it depends entirely on the sendmail() function. =/
archive:
site:
Available for skin/mod commission! π
Thanks! I think the next step is to go over my sendmail config and make sure it's not giving off a false negative back to eFiction then. π
OK, I found the bug. it has to do with uppercase and lower case. If a user registers with JEFF@WELL.COM and then asks for a new password by typing in jeff@well.com, the email will not be sent as eFiction is looking for a case sensitive match. I have tested and confirmed this. Now, if I register with jeff@well.com and then type in JEFF@WELL.COM in the forgot password, it works. It's only if I do uppercase in the email field. I guess I could fix this by taking case sensitivity out of the equation.
It's not a problem in the script itself. It's in the collation of your mysql tables which is not determined by the script, but by your mysql setup.
http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html
But wasn't the SQL table created and configured by the eFiction install script?
No tthe collation. That was left to the default of your mySQL server.
Ah, gotcha, very cool, thanks. π
I checked out the collation and it's latin1_swedish_ci, so I'm stumped because that's case insensitive, but it's not behaving that way.
Change it to latin1_bin.
