Php email service

software development

#1

Hello,
I run a website that sends out custom status emails to 120 people once a week. I have a cron job that runs a php script to generate and send each email.

All was working great when I only had about 90 emails to send, but now it appears that I am sending too many/too fast, and google (I am sending via PHPMail via Google Apps) the script is stopping (“SMPT Login error”) before sending all the emails.

What methods do people use for sending out a larger number of emails?

Do you recommend that I simply create two cron jobs 15 minutes apart (It seems that if I wait 5/10 minutes, I can re-send emails) and have a script to run the 1st half of the emails and one to run the second half? Seems sloppy if I end up with 300 emails to send…

Should I generate the email fields (to,from,subject,message) and store them into a MySQL table, and then have a script that sends email from the table 50 at at time, waits 15 minutes and sends the next 50, etc?

Looking for suggestions and I appreciate any assistance.
~Nacho


#2

The limit you’re running into is 100/hour. SMTP quota’s.

Since your email is only once a week, you could probably just sleep(60) between emails to slow down the send rate.