title: Email batches via AWS SES, ideas?
body: <p>I have an SaaS application where each paying customer may have thousands of members they may want to send emails to every now and then.</p>
  
  <p>For now, simple BCC sending via AWS SES have done the trick, but now I am looking at sending personalized emails so I must be able to send the emails one by one.</p>
  
  <p>SES does not have any queue system as per my knowledge, you must make an API call per email. In short, it takes forever to send a batch (my limit is 14 per second), and the user cannot close the page while it is executing (even AJAX calls stop executing if you leave the page, am I right?).</p>
  
  <p>I was thinking of building a system where I store the emails in a database table and then either:</p>
  
  <p>1) Use a CRON that executes every 5 seconds or so, grab a few emails and send them.</p>
  
  <p>2) Execute an AJAX script each 5 seconds that grabs the emails for said logged in customer in a batch ONLY and send them out, but again, if the customer logs out while it executes chances are that specific a batch is interrupted (the remaining ones would still keep sending the next time the customer logs in).</p>
  
  <p>Does any have any better ideas? Or, which of the two above would be preferred?</p>