From a1865e267b618b92910e27defaf5f2b78a9211c4 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 11 Feb 2010 15:59:41 +0000 Subject: [PATCH] When sending, make sure we check to make sure result is NULL as well, becuase if its cancelled, sent will be NULL but result will be cancelled --- admin/send_emailqueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/send_emailqueue.php b/admin/send_emailqueue.php index 458bceb..f983759 100644 --- a/admin/send_emailqueue.php +++ b/admin/send_emailqueue.php @@ -32,7 +32,7 @@ if(!$config['emailqueue_lock']) { //loop forever, but not really, it'll get break'd as soon as there's nothing left to send while(true) { - $q=mysql_query("SELECT * FROM emailqueue_recipients WHERE sent IS NULL LIMIT 1"); + $q=mysql_query("SELECT * FROM emailqueue_recipients WHERE sent IS NULL AND result IS NULL LIMIT 1"); if(mysql_num_rows($q)) { $r=mysql_fetch_object($q); $eq=mysql_query("SELECT * FROM emailqueue WHERE id='$r->emailqueue_id'");