title: Can a simple PHP For Each loop handle sending email to 10,000?
body: <p>I'm sending an email to 10,000 emails using a PHP for each loop. Is there any reason why this isn't best practice for handling 10,000 emails? Could this execution hang? I want to be sure this will go out to all emails.</p>
  
  <pre><code> foreach($thecustomer as $key =&gt; $value){
        $to = $customeremail; 
        $fromemail = $shopowner . " &lt;" . $email . "&gt;"; 
        $subject = $subject;
        $message = $body;
        $headers = "From:" . $email . "\n";
        $headers .= "MIME-Version: 1.0\n";
        $headers .= "Content-Type: text/html; charset=ISO-8859-1\n";
        mail($to,$subject,$message,$headers);
   }
  </code></pre>