> I currently run a few newsletters that go out to small groups of > % 50 to 100 people. I use a while loop to send out the emails. I chose
I have a module that does about about 100 emails (10Kb of data per email, which is a decent sized email) in 8 - 10 seconds. (Does around 610 - 625 emails per minute). This is accomplished by skipping PHP's internal mail functionality entirely and making a direct socket connection to the SMTP server. Another benefit of this is that any MySQL delay can be removed from the actual mail functionality by adding all the recipients to the class, and closing the MySQL query - before sending the emails. Ultimately, the speed really depends on the SMTP server. I'm sure with a little hacking, I may be able to get 650 - 675 emails per minute. One faster method of sending bulk emails requires A) having direct access to the filesystem of the mail server, and B) hacking sendmail configuration - which both mean "root" access. I've gotten up to 850 emails per minute with this method. The class is easy to use - basically: $_Mailer = &new mod_sendmail(); $_Mail->setSubject( strText ); $_Mail->setBody( strText ); $_Mail->addRecipient( strName, strEmail ); $_log = $_Mail->sendAll(); The $_log var is an array in the format of: $_log[ strEmail ] = strData strEmail is the intended recipient, and and strData will either be A) the MsgID returned by the SMTP server on success or B) a "0" if failed. This makes it possible to add a function to re-send failed emails later. If you want the socket-based code, just send me a private email to [EMAIL PROTECTED] I'm working on getting a code repository going, but for now, just have to send it to you directly. -- James [EMAIL PROTECTED]
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php