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; } ?> 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. 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 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. Link to comment https://forums.phpfreaks.com/topic/243701-mail-vs-delete/#findComment-1251247 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.