note 89375 added to function.mail

From: Date: Thu, 05 Mar 2009 02:52:07 +0000
Subject: note 89375 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-151499@lists.php.net to get a copy of this message
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. ---- Server IP: 195.184.96.15 Probable Submitter: 90.185.142.211 ---- Manual Page -- http://www.php.net/manual/en/function.mail.php Edit -- https://master.php.net/note/edit/89375 Del: integrated -- https://master.php.net/note/delete/89375/integrated Del: useless -- https://master.php.net/note/delete/89375/useless Del: bad code -- https://master.php.net/note/delete/89375/bad+code Del: spam -- https://master.php.net/note/delete/89375/spam Del: non-english -- https://master.php.net/note/delete/89375/non-english Del: in docs -- https://master.php.net/note/delete/89375/in+docs Del: other reasons-- https://master.php.net/note/delete/89375 Reject -- https://master.php.net/note/reject/89375 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151499) next »