note 89375 deleted from function.mail by danbrown

From: Date: Thu, 05 Mar 2009 03:25:24 +0000
Subject: note 89375 deleted from function.mail by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-151500@lists.php.net to get a copy of this message
Note Submitter: knl at bitflop dot com ---- In the notes it says this: "It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient. For the sending of large amounts of email, see the » PEAR::Mail, and » PEAR::Mail_Queue packages. " I ran some tests because I needed to send out large amounts of email (above 5000) and I got horrible results using the PEAR:Mail package with Sendmail (using the Postfix wrapper). 5000 mails using PHP build-in mail function 1.0590 seconds. 5000 mails using PHPMailer 1.1384 seconds. 5000 mails using PEAR:Mail 20.0409 seconds. The test was run on an idle AMD 2X64 bit CPU with 6 Gb of ram. During the 20 seconds that PEAR:Mail was running the CPU (using top) was at 100%. Don't use PEAR:Mail for sending out large amounts of emails. I tested PHP build-in mail function with more than 6000 emails, but it couldn't handle that much.

« previous php.notes (#151500) next »