Jump to content

Mailer not working


nathanmaxsonadil

Recommended Posts

my mailer is not working :(

it does not give me any error and it does not send it

is there anyway to debug it?

here's my code

else {

$checklogin2 = "SELECT * FROM users WHERE email = '". $_POST['email']. "'";
$checklogin = mysql_query($checklogin2);
while ($row = mysql_fetch_array($checklogin, MYSQL_ASSOC)) {
if(mysql_num_rows($checklogin) == 0) {
forum("Your email is not registered with us!<br/><br/>");
include 'sidebar.php';
echo $divs;
include 'footer.php';
exit();
}else if(mysql_num_rows($checklogin) == 1) {
$password = createRandomPassword();
//mailer
$to      = "{$_POST['email']}";
$subject = 'your new password';
$message = "Your new password at Swap Invites is {$password}";
$headers = 'From: [email protected]' . "\r\n" .
    'Reply-To: [email protected]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers) or die;
//end mailer
$password = sha1($password);
mysql_query("UPDATE `users` SET `password` = '{$password}' WHERE CONVERT( `users`.`username` USING utf8 ) = '{$row['username']}' LIMIT 1") or die;
forum("Your new password should be waiting at your inbox!<br/><br/>");
include 'sidebar.php';
echo $divs;
include 'footer.php';
exit();
}
}
}

Link to comment
https://forums.phpfreaks.com/topic/65587-mailer-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.