> From: "Matt Schroebel" <[EMAIL PROTECTED]> > >> -----Original Message----- >> From: Lowell Allen [mailto:[EMAIL PROTECTED]] >> Sent: Monday, February 03, 2003 12:38 PM >> To: PHP >> Subject: [PHP] tracking bulk email >> (1) My client is nervous about the script failing mid-list >> and not being >> able to determine which contacts were sent mail. I need a way >> to build this >> check into the content management system. I could write a flag to the >> database every time mail() returns true, but that would mean >> 1400 database >> updates! If I instead append to a variable each time through >> the mail() >> loop, I'll lose the record if the script times out. Can >> anyone suggest a way >> to record the position in a loop if a time out or failure occurs? > > What's wrong with 1,400 database updates? Seems to me that's the most > straight forward solution, easiest to recover from, easier for someone > following your footsteps to work on later, and is what db's are for.. > Have you timed it, and felt pain? You could email yourself 1,400 times > to test, and see if it hurts.
I haven't tried it from a database, no, and I don't know if the time requirement would be prohibitive. As it is, the best test time has been 0.186 seconds per email, and the worst has been 0.847 seconds per email (from about 4-1/2 minutes to about 19-3/4 minutes for 1400 addresses). I just *assumed* it would take longer to write to a db; I should compare. I certainly agree it would be easier to manage recovery from mid-list failure with everything stored in a database. -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php