View Single Post
Old 19-03-2004, 10:27   #5 (permalink)
DaiWelsh
Registered User
 
Join Date: Mar 2004
Location: Derby, UK
Posts: 24
I have written such an app for a client with a 3k recipient mailing list and the loop as suggested by sharif worked fine functionally. However I added code to record that each recipient had received a copy of the message immediately after each mail() call. That way if the script or mail server chokes half way through you can resend the message to the list (fairly) confident that no-on will get duplicates.

This worked fine for a few months but last month it started failing semi-randomly and when we contacted the host they had changed their emailer to limit mails per hour. Therefore we have rewritten the app to log to the database but not actually send. Then we launch a script once an hour via a cron job which mails to 50 outstanding recipients. That way the mails are spread out and the host is happy, but we still get the message to all 3K recips over a couple of days. As the newsletter is not that time critical that is fine for my client.
  Reply With Quote