title: Sending mass email using PHP
body: <p>I am currently writing a music blog. The administrator posts a new article every 2-3 days. Once the administrator posts an article, a mass email will be sent to around 5000 subscribers immediately. </p>
  
  <p>What is the best way to implement the mass mail feature?</p>
  
  <p>Does the following function work?</p>
  
  <pre><code>function massmail() 
  {
    $content = '...';
    foreach ($recipients as $r) {
      $_content = $content . '&lt;img src="http://xxx/trackOpenRate.php?id='.$r.'"&gt;';
      mail($r, 'subject', $_content);
    }
  }
  </code></pre>
  
  <p>Another question: If all 5000 subscribers are using Yahoo Mail, will Yahoo treat it as a DDOS attack and block the IP address of my SMTP server?</p>