title: get list e-mail list from database and send mail to all from php script without using any api
body: <pre><code> $sql = "select emailid from table where category = 1";
      while($row=mysql_fetch_array($sql))
      {
              $email=$row['emailid'];
              $to = $email;
  
              $subject = "E-mail subject";
              $body = "E-mail body";
              $headers = 'From: info@mydomain.com' . "\r\n" ;
              $headers .= 'Reply-To: info@mydomain.com' . "\r\n";
              mail($to, $subject, $body, $headers);
      }
  </code></pre>
  
  <p>Suppose the above code will fetch 100 e-mail ids from database and send the mail one by one to  each e-mail id. but what i want to do is.... fetch all e-mail ids in an array and send them as 'BCC' to each e-mail at once. one more thing i want to customize the e-mail body content for each id....</p>
  
  <p>Any ideas?</p>