tracking bulk email

From: Date: Mon, 03 Feb 2003 17:37:58 +0000
Subject: tracking bulk email
Groups: php.general 
Request: Send a blank email to php-general+get-134149@lists.php.net to get a copy of this message
I've added an email feature to a content management system that will send plain text email to about 1400 contact addresses. Each contact is sent a separate email with the contact name and address in the "To:" header. It works fine to small test lists, but hasn't been tested with a large list. Although I think list posts should only pose one question, I have two: (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? (2) In order to avoid the script timing out, I'm counting the number of mail() attempts and calling set_time_limit(30) every 50 attempts to provide another 30 seconds of script execution time. I'm on a commercial Linux host, PHP 4.1.2, phpinfo.php shows the configuration command includes '--enable-safe-mode', but the directive safe_mode is "Off". I'm building a test list with over 100 messages, but has anyone done something similar to prevent the script timing out when sending lots of mail? Thanks. -- Lowell Allen

« previous php.general (#134149) next »