Making a php mail function send to everyone in database but 1 person every minute

I have a database of users with their emails but as my hosting provider doesn’t allow mass emails I was wondering if there is a way so that I can send the same email to everyone in the database but 1 person ever 1 minute. So that It sends to person ‘1’ and waits one minute then sends to person ‘2’ and waits one minutes and keeps doing that till it has sent to everyone. I have php and html knowledge and also a bit of javascript.

I think this can be done with cron jobs but how exactly? I don’t use cron jobs much so I need detailed help.


How many people will you be sending to? It might be worth it looking at a paid service like Mailchimp or Amazon SES.

Building a mail service for a lot of emails is one of the hardest things to do and 9 of 10 times getting a paid service is cheaper in the long run because you don’t have to worry about all the maintenance stuff like blacklisting etc.

Can I use google apps? And send through SMTP from 3rd party software?

Yes you can do that as well, but the same limitation holds. You can probably go faster than 1 every minute, but google apps also doesn’t like it if you blast a lot of emails at it. No SMTP server does. Which is why I suggested the alternatives :slight_smile:

What I did is echoed out all the usernames and emails from my table to a file then used MaxBulk Mailer and connected to my google apps account. Then I loaded the emails from web page and boom they all popped up which then allowed me to create a nice message and send to all users.

This is what the email looked like.