php - why my project can only send out 2 email at 1 time? -


i trying send out 20 email @ 1 time when run php file , send out 2 out of 20 email. keep try reload php page , send out 2 @ time. so, can code below?

<? require_once "lib/base.inc.php";  $arrresult = $oadminemail->getqueemail();  for($i=0; $i<count($arrresult); $i++) {     $iid = $arrresult[$i]['id'];     $email = $arrresult[$i]['contact_email'];     $name = $arrresult[$i]['contact_first']." ".$arrresult[$i]['contact_last'];     $message = "test";      $subject = "test";     $sendflag = $emailer->sendedm($email,$name,$subject,$message);      if ($sendflag)              {                 $update['status'] = 1;                 $update_edm = $oadminemail->updateemailstatus($update,$iid);             } }   ?>  function getqueemail()         {             global $db;             $arrresult = array();              $stmt = "select * "._const_tbl_email_outgoing." status = '0' order id asc limit 20";              if($rs = $db->execute($stmt))             {                 $arrresult = $rs->getarray();                        }              return $arrresult;         } 


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -