Re: What is wrong with this code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

9el wrote:
> *Note:* 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.
> *
> Note:* The following RFCs may be useful: » RFC 1896, » RFC 2045, » RFC 2046,
> » RFC 2047, » RFC 2048, » RFC 2049, and » RFC 2822.
> 
> Copy from PHP Manual.

The PHP manual is wrong. Using the mail function does not necessarily
make it open and close SMTP connections for every recipient. That is
true with PHP under Windows.

When you use sendmail or equivalent (Postfix, Qmail, etc..) on Linux
usually the message is just dropped in the queue and the mail server
takes it from there. PHP does not necessarily have to wait for the
message be delivered to the remote recipient via SMTP.

You may want to read a more complete explanation here:

http://www.phpclasses.org/blog/package/14/post/1-Sending-messages-to-many-recipients-via-SMTP-in-PHP.html


-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux