Re: php mail function vs smtp server
| From: | Richard Lynch | Date: | Mon, 31 Oct 2005 18:03:56 +0000 |
| Subject: | Re: php mail function vs smtp server | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-224895@lists.php.net to get a copy of this message | ||
On Mon, October 31, 2005 4:10 am, Clive wrote:
> 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.
SMTP
PHP's mail() function was never designed for high-volume email.
It fires up a different process of sendmail for EACH email.
This is NOT cheap, nor efficient.
mail() is convenient. It is not efficient.
Use mail() for quickie one-off emails.
Use something else for mass email.
There are classes/packages you can use to make this painless.
http://phpclasses.org has at least one that gets
used/recommended a lot.
--
Like Music?
http://l-i-e.com/artists.htm