voip03 Posted August 3, 2011 Share Posted August 3, 2011 Without delete code mail () function work very quick ( means get email immediately ). When I place delete the mailing process taking 20-30 mints to get mail. Why? TIA <? if (mail($verifyemail,"Your new password !", $mail_body,$headers)) { echo "<div class='feedback'><span > <br/><br/> Your password has now been reset and emailed to you. Please check your email to find your new password. To change your password, please use this <a href='http://www.site.info/'>form</a>.</span></div>"; // Delete the code mysql_query("DELETE FROM passwordReset WHERE id='".$validid."'") or die(mysql_error()); } else { header("Location:".$config_basedir."resend.php?error=1854621"); exit; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/243701-mail-vs-delete/ Share on other sites More sharing options...
trq Posted August 3, 2011 Share Posted August 3, 2011 The query in your example has no effect what so ever on the call to mail. Quote Link to comment https://forums.phpfreaks.com/topic/243701-mail-vs-delete/#findComment-1251235 Share on other sites More sharing options...
AyKay47 Posted August 3, 2011 Share Posted August 3, 2011 really it will have no effect since your if statement is based upon the condition of the mail function resulting in TRUE...perhaps just a coincidence.. EDIT: As Thorpe said before me Quote Link to comment https://forums.phpfreaks.com/topic/243701-mail-vs-delete/#findComment-1251238 Share on other sites More sharing options...
voip03 Posted August 3, 2011 Author Share Posted August 3, 2011 Thank you AyKay47 and thorpe If I remove delete I get the email in a sec, that why I thought some where I am making a mistak. Quote Link to comment https://forums.phpfreaks.com/topic/243701-mail-vs-delete/#findComment-1251247 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.