My website sends several thousand emails out each day to my registered users. I'm finding that ISPs are becoming more strict on their rules and regulations for incoming email. Some of the bounced messages have an error stating that the ISP received too many emails at once from my mail server. In attempt to comply with their demands, I'm trying to think of a good way to adjust my cron job, which pulls emails from the mySQL database several times a day to send out the next batch of emails.
For you database experts, is there a way to structure my query so that the "sender" column, which contains the actual email address, will only send a few emails to a given ISP each time the query is run? Meaning, there might be 50 emails waiting to go out that are addressed to gmail.com users, and 30 emails waiting to go to yahoo.com users, but I would like to limit the results of my query so that five gmail.com users and five yahoo.com users are returned. I'm not really sure how to structure this, otherwise I would check out the mysql.com forum in an attempt to learn this on my own.