I used to have a major problem on my old hosting package where emails from my website to yahoo/bt just disappeared into the ether. I have since changed hosts and re-formated my mail scripts to use phpmailer SMTP and all generally appears to be working much better.

However I seem to be receiving more and more complaints that people are requesting their username or password and not receiving the email (or the registration email) and I have no idea why. This time there doesn't appear to be any pattern with isps.

Has any had this problem and been able to solve it or can anyone suggest a solution?

In case it helps, the code for the forgotten password facility is below (I have received no indication of errors being generated):


if (!empty($_POST['button_submit']) && isset($_POST['username']))

	$auth_obj=new auth;

	if (!empty($username))
			$obj_db=new database;
			$sql=mysql_query("SELECT user_id FROM users WHERE username='$username'");
			if (!empty($query['user_id'])) {
			mysql_query("UPDATE users SET user_auth='$pwd' WHERE username='$username'");
			else {
				header ("location: forgot_user.php?user_fail=1");
			$mail = new PHPMailer;
			$mail->Host = SMTP_HOST;
			$mail->Port = SMTP_PORT;
			$mail->SMTPAuth = true;
			$mail->Username = SUPPORT_USERNAME;
			$mail->Password = SUPPORT_PASSWORD;
			$mail->FromName = FROM_NAME;
			$mail->From = SUPPORT_USERNAME;
			$mail->Subject = 'Simply Canine Account';
			$mail->Body = "<p>Your Simply Canine account password has been reset to:</p>";
			$mail->Body .= "<p>".$user_auth."</p>";
			$mail->Body .= "<p>Please go to http://www.simplycanine.co.uk/login.php to login. You may also change your password to something more memorable if required.</p>";
			if(!$mail->Send()) {
			   echo "Error sending: " . $mail->ErrorInfo;
			} else {
			   $success_message="<p>An e-mail containing your new password has been sent to: <strong>$email</strong></p>";
			   $success_message.="<p>Once received, please <a href=\"/login.php\">login</a> again.</p>";
		$fail_reason='Your username could not be found, please try again.';

I have tested all the basics and get no problems or errors.

5 Years
Discussion Span
Last Post by simplypixie

your website host also provides you with a log for smtp emails in and out
i would ask the user what day and around what time it happened to see if there was
a error in smtp maybe it got blocked or failed there


Thank you - I will ask my hosts where that error log is as not in my normal error log files.


i know i had a issue with my website being able to send a speficiy amount of emails in a given hour it was hard to find untill i got the email error log


I have checked the error log and apart from a problem with aol, other emails that have not arrived seemed to go through OK and these aren't multiple emails just one here and there (in fact when I send multiple emails it seems to work better).

Only advise my host can give (and was the same before) is for my customers to contact their ISP and find out what happened to the email - not practical really.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.