I have a MySQL db of email addresses. I want to send an email to each of these addresses. Catch: there is a tailored (unsubscribe) line for each to go in the message of each email.
If I write a routine to go through the list and send each email, reporting the send to the browser as it goes, that works - but it can take a long time with the browser ticking through the list. And if the user closes the browser the sending stops there.
If I do the same thing WITHOUT reporting to the browser at each send then nothing goes - the PHP reports to the browser and stops.
How do I get PHP to run through the list completely in the background?