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: noreply@swapinvites.com' . "\r\n" .
    'Reply-To: noreply@swapinvites.com' . "\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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.