[php]while($row = mysql_fetch_array($sql))
{
$id = $row[“id”];
$un = $row[‘username’];
$to = “$email”;
// Change this to your site admin email
$subject = “Password Reset”;
//Begin HTML Email Message where you need to change the activation URL inside
$message = ‘
Hi $un
Someone has requested a password reset for your account. If this was you, CLICK HERE. Otherwise just delete this email and report it to me. I will have a report form soon.
NOTE: Do NOT reply to this E-Mail, the account is not monitored.
’;// end of message
$headers = ‘From: [email protected]\r\nContent-type: text/html\r\n’;
// Finally send the activation email to the member
if (mail($to, $subject, $message, $headers))
{
exit(“You should have your reset within a couple minutes.”);
}
else
{
exit(“Failed to send reset, try again later.”);
}
}[/php]
It came back with Failed to send reset, try again later.
What am I doing wrong?