Re: php mail function vs smtp server

From: Date: Mon, 31 Oct 2005 10:34:34 +0000
Subject: Re: php mail function vs smtp server
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-224870@lists.php.net to get a copy of this message
Clive wrote:
Hi does anyone know whats better/uses less resource etc: If I run a loop to send a 1000 emails, should I use php's mail fucntions or send directly to the servers smtp server.
Depends on your setup. If you're on Linux/Unix you could use the mail() function along with the "-odq" option to Sendmail/Postfix/Exim etc (fifth argument to the mail() function) which will dump all the mails into the MTAs queue. After this, the MTA will handle delivery. This is probably the quickest for this platform. -- Richard Heyes http://www.phpguru.org

« previous php.general (#224870) next »