I've got thousands of emails to send, how should I do it?

99.9% of the time the best approach to doing this is to store all the emails and recipients in a database with a field marked as “unsent”. A cron script can run every few minutes pulling out more modest batch sizes of around 100 emails, then flagging those as “sent”.

There are plugins such as AntiFlood and Throttler to aid in large batch sending but there’s no substitute for running regular smaller batches.

I have also taken the approach of running a command line PHP script in the background with a perpetual while() loop int it, sleeping for a few seconds at the end of each loop. This mimmicks cron’s behaviour except that new processes are not spawned since the script runs once only. Each iteration of the loop can pull out 50-100 emails and send them.

If you really do have an extremely large number of emails to send you’ll almost certainly have to pay for a SMTP server, preferably several otherwise you’re effectively going to DoS somebody else’s server ;)