I would like to know if anyone has had any experience with using PHP to send mass emails (+- 4000 emails). I'm trying to find a method to avoid server load, and to professionally and efficiently handle the mailing.
My first method was to send a batch of emails at a time. So it would loop through 30 emails and send the mail off using mail() function, and update the 'sent' field for the email. Once the batch of 30 emails were sent, I would output some javascript to reload the page after 5 seconds.
The script would then load the next 30 unset emails and the process is repeated until all emails have been sent.
This method is obviously not the best as you need your browser open to continuely load the sendmail script, and the entire process may take up to 2 hours.
With using this method, the execution time to send 30 emails was anywhere from 2 seconds to 64 seconds..
So to avoid execution time exceptions, and to make the process run by the server and not the client, I thought of using cron jobs, although i've never dabbled with cron before.
I was wondering if anyone had any suggestions, or if you could point me the right direction it would be greatly appreciated.
Many thanks, Rich








Bookmarks