MBF Knowledge Base

I am using a PHPMailer script to send email. My server host has email rate limiting set to 100 emails per hour. I need to send out more than 100 emails per hour. How do I work around this?

There are a few things you can do.

1.) Check with your host to see if they will disable or increase the limit. They probably will not, but it's worth asking since this is the simplest solution.

2.) Put a sleep(60) command between each blast of email to set your limit to 60 items per hour. (That's a 60 second delay between each, i.e. one minute). You could decrease that slightly to move up to your 100/hour rate. (Of course, don't do this in a web request - do it as a console/cron process on the server.)

3.) Persist the email delivery queue to a database. Use a cronjob and send 100 emails every hour (or 99 to be safe).

4.) The YouTube video at the following link is another option: Mass Email Website Newsletter Bulk Batch Send Tutorial PHP MySQL.