SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    865
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Attempting to not blast an ISP all at once with lots of emails

    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.

    Thank you!
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,615
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    You could use a WHERE clause with LIMIT.

    Code:
    SELECT `emailAddress` from `myEmailList` WHERE `emailAddress` LIKE '%@gmail.com%' LIMIT 15
    But then you have to also keep track of who an email has been sent to and who hasn't. The best option might be to create a temporary table for all the addresses you need to send to, and simply delete the address from the table once you've sent an email to it.

    Or, you could use a 3rd-party email service. They keep on top of sending limits and whitelists/blacklists so you don't (typically) have to deal with that stuff.
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,227
    Mentioned
    194 Post(s)
    Tagged
    2 Thread(s)
    I think that if you're sending out "several thousand emails out each day" your ISP probably won't care as much about the batch sizes as much as they will the volume.

    Having a third part email service would not only save you worry, but you may find the "extras" they can provide (eg. open rates, A/B testing click throughs etc.) an added benefit.

  4. #4
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    865
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I thought of a service like ConstantContact. However, the emails I generate and send out are generated on-the-fly using data from the database and are, therefore, very customized to each recipient. The email services you refer to are typically best suited for a "newsletter" type email, where each recipient is basically receiving the same content, right? Please correct me if you had something else in mind.

    Thank you.
    Convert your dollars into silver coins. www.convert2silver.com

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,227
    Mentioned
    194 Post(s)
    Tagged
    2 Thread(s)
    I don't know how your "several thousand" emails are "very customized", but for example, I get periodic emails from CVS (a convenience strore chain) that have my first name inserted into it and contains items of interest that pertain to stores in my geographic location. (eg. I live in New England so in addition to the expected Holiday stuff I also get Winter stuff that would be of no interest to those living in warmer areas).

    I imagine the email services would have something like "tags" to allow you to modify a "template" to some extent.

  6. #6
    Barefoot on the Moon! silver trophy Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,615
    Mentioned
    56 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by busboy View Post
    I thought of a service like ConstantContact. However, the emails I generate and send out are generated on-the-fly using data from the database and are, therefore, very customized to each recipient. The email services you refer to are typically best suited for a "newsletter" type email, where each recipient is basically receiving the same content, right? Please correct me if you had something else in mind.
    There are two basic kinds of services available. The kind where you create and send newsletters all within the system (like constantcontact, mailchimp, aweber, etc), and the services that act just as an SMTP server (like sendgrid, mandrill, amazon SES, mailgun, etc) where you create the message and just use the service to send it out.
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  7. #7
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,065
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    Could the contents of some of the emails get combined if you're sending more then one to the same person in a given 24hr period? Typically how many emails is a single person being sent in a 24hr period?
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •