Hello, On 01/23/2003 01:48 AM, Jonathan Chum wrote:
People that say that are either Windows users or have no idea how mail works. Only on Windows the mail() function relays messages to a SMTP server. Under Unix/Linux mail just calls the sendmail program piping the message data to the standard input like with popen and pclose.Then with PHP's mail(), folks have been saying that because it opens/closes a connection, looping through mail() adds additional overhead and that the best way would be to pipe into the MTA with popen()/pclose()
Forget relaying on a SMTP server even when it is the local server. Relaying via SMTP just does the same thing as piping data to sendmail except that it takes a longer trip by establishing a TCP connection to the SMTP server.Now I'm curious which method is really better...Piping into the MTA will still open/close the connection and adds the same amount of overhead as mail() do right? What are your thoughts on SMTP?
To make relaying faster, it is better to call sendmail directly passing the necessary switches to make it just accept the message without any delay so it will free your PHP script. Delivery will happen next time it will run the queue.
--
Regards,
Manuel Lemos
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php