progman1010
Programmer
I wrote a mail script which sends emails by cron job once every 10 minutes. This way, i can queue up large volumes of mail into a db table and not worry about my individual scripts stalling.
The problem is that with any volume over approximately 1000, the system sends 4 copies of the same email (very bad). The only think i can think is happening is that the script runs, sending the mail, but never flags the mail as 'sent.'
You'll see in the code attached that the sending and the flagging as sent are done separately. I thought it'd be a good idea to do this for speed- but I do see the hole in my theory.
I am interested in hearing your thoughts on how to make it more efficient and reliable.
Thanks!
The problem is that with any volume over approximately 1000, the system sends 4 copies of the same email (very bad). The only think i can think is happening is that the script runs, sending the mail, but never flags the mail as 'sent.'
You'll see in the code attached that the sending and the flagging as sent are done separately. I thought it'd be a good idea to do this for speed- but I do see the hole in my theory.
I am interested in hearing your thoughts on how to make it more efficient and reliable.
Thanks!