dividing the PHP mail function into seperate tasks, making it more efficent and able to handle a much higher volume of recipients
<p>Say I wanted to send over 10,000 emails to 10,000 different recipients (email addresses) all fetched from a SQL DB, but obviously, I'd have issues using the <code>mail();</code> function alone...</p>

<p>So I was thinking, If I separated the task (to send 10,000 emails) into like 100 different tasks, which gets processed every 3 seconds through AJAX.</p>

<p>This is how I'm thinking of dividing the big task into many small ones:</p>

<p>Firstly, check how many recipients in the task (10,000 in this case).</p>

<p>If there are over 100 recipients in the task, begin dividing:</p>

<p>if there are 200 recipients or less, divide the total into 2</p>

<p>or if there are over 200, divide into 3 and so on....</p>

<p>So basically, make sure the total gets divided into separate tasks, with no more then 100 recipients each task...</p>

<p>then store each set of recipients in a SQL db per ROW, along with the users messege and subject and all the other headers and stuff...</p>

<p>Then, an AJAX request runs every 3 seconds, processing one task at a time.</p>

<p>So the END result: I'll have many different tasks in the SQL db pending completion. Where each one will be completed every 3 seconds...</p>

<p>Now I need to know if this really is more efficient and will allow me to use the mail(); to handle a much higher volume?</p>

<p>or will I just be wasting my time?</p>

<p>cheers</p>
