title: PHP Mass Email Best Practices? (PHPMailer + Gmail)
body: <p>I'm thinking about how to handle sending large amounts of email from my web applications, and whether there are any best practices for doing so. StackOverflow is already labeling this as 'subjective', which it may be to an extent, but I need to know the most successful way to implement this system, or whether any standardized approach exists.</p>
  
  <p>In my webapp, there are users who are heads of groups of 1 to 10,000 users. This user must be able to email send a message to all of these users through my system. Therefore, my system is responsible for sending up to 10,000 emails to individual users for each group head.</p>
  
  <p>As far as I can tell, there is no rate limit in GMail for sending messages to individuals (although there is a 500 recipient max).</p>
  
  <p>Right now, my current setup is:</p>
  
  <ul>
  <li>When a message is sent through the system, it enters an email queue.</li>
  <li>A cron script grabs messages from the queue every few minutes, and sends out those emails.</li>
  <li>All email is taking place through GMail's SMTP server.</li>
  <li>The actual application doing the mailing is PHPMailer.</li>
  </ul>
  
  <p>This setup, as the user base grows, will probably not suffice. The questions I have are:</p>
  
  <ol>
  <li>Should I be using a local SMTP server instead?</li>
  <li>Should I use a mail binary on the local machine instead? I this case, I could probably skip the queue altogether?</li>
  <li>Is there an accepted way to do this?</li>
  </ol>
  
  <p>Thanks!</p>