PHP Mass Mailing Solution

I mentioned before that I was having problems with a mailing script to a large number of recipients. I´ve been looking around for a solution so that I get some mailings done without making everyone mad by getting a dozen or so copies of the email.
 
After searching around for a while I was reading the PHP manual page for the mail() function and read the bit that says "don´t use the mail() function for mass mailing". Apparently it opens a new connection to the server for time it is called and if used in a loop for a large number of people, it can obviously cause problems. The solution it suggests is to use the PEAR::Mail functions that are built into the PHP download as default.

 
I´ve now modified the script to use this and am running a few tests on my own mailboxes with about 12,000 made up addresses. The other advantage of it is that it lets you use and authenticate with any SMTP server so I can use our webhost instead of my poor little overloaded mail server in the office. I´ll post again when I know if it´ll work or not.

About the Author

I'm a web developer based in the East Midlands, UK and if I keep up the current rate, I might have developed 3 million sites by the time I retire