Re: mail() vs sockets

From: Date: Fri, 07 Feb 2003 22:34:52 +0000
Subject: Re: mail() vs sockets
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134819@lists.php.net to get a copy of this message
just post once ----- Original Message ----- From: "Jeff Busby" <jeff@tbz.com> To: <php-general@lists.php.net> Sent: Friday, February 07, 2003 9:30 PM Subject: [PHP] mail() vs sockets Question regarding php's mail function. I've created a targetted mail system for a client, that uses the mail() function to send the the customer list. I find it's ok for a few hundred names, however the client has a list of over 10000 and I know that would be way to taxing on the server, as some tests have shown. I got the following function off the php.net site and I'm wondering if something like this will be significantly more efficient than using the mail function. function sendmail($to='', $subject='', $message='', $headers='', $extra='') { $fd = popen("/usr/sbin/sendmail -t $extra", 'w'); fputs($fd, "To: $to\n"); fputs($fd, "Subject: $subject\n"); fputs($fd, "X-Mailer: PHP4\n"); if ($headers) { fputs($fd, "$headers\n"); } fputs($fd, "\n"); fputs($fd, $message); pclose($fd); } At this point using perl or another language is not an option. Any advice or links would be appreciated. Cheers, Jeff.

« previous php.general (#134819) next »