Re: Re: mail() takes too much time

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

 



Matthew Lasar wrote:
I run pretty simple mail group distribution program that uses php/mysql and the mail() function. I adapted it from an open source script. Most of the time it runs well. But it does take a while to run through all 150 members of the list. So I'm half glad that I don't have a list of 1000 people or more.

Any way to optimize the mail function in terms of speed? Probably too vague a question, sorry.

Don't use the mail function. On a unix-based system it will pass the message directly to sendmail which will attempt to deliver the message in realtime. When you're sending a large amount of mail that sucks.

Your best option is to switch to using a system that connects to the SMTP server on localhost directly. That way you can dump each message on to the local MTA quickly and then forget about it.

As an example one of the newletters I maintain has over 300,000 subscribers and the system that sends the emails (written in PHP of course) takes less than 6 hours. The mail queue on that machine gets very big and then it's up to the MTA to work through sending the messages as quickly as it can (which usually takes about 28 hours).

-Stut

--
http://stut.net/

--
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