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.

Reply via email to