#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2004
    Location
    Boston, MA USA
    Posts
    529
    Rep Power
    50

    Background e-mail script


    Hi:

    I have a CRM which I have written in PHP/MySQL and I would like to include an email routine that would sit in the background and send emails to as many as 500 contacts.

    From what I understand, it is important to pace the email sends so that the server is not flagged as a bulk spammer. So, I'd like a reliable program that will send each email with a few seconds between each but not time out. I'd like it to run from the background so the user is not sitting waiting for it to complete.

    BTW, I have a routine which spawns a separate wind to run in and uses the sleep() function to pause, but after a couple hundred emails I get a "405 Not allowed - nginx" message.

    Does anyone know of such a routine or have advice as to how to construct this?

    Thanks
  2. #2
  3. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,279
    Rep Power
    2039
    The "standard" way that I've seen this done in the past is to use a mail queue that all of the messages get added to by your system, then a stored job (mainly CRON's) that read the queue and send how ever many messages that it's set to. So every time the mail processing script runs it sends the first (for example) 100-200 emails from the queue then exists. Then the next time it's run it does the same until all emails are sent.

    Also, from what I've seen the rate of sending is nowhere near as important as the quality of your list, and the content of the messages. Always include an "unsubscribe" link that actually works, along with the actual company details. Then monitor any bounces and replies (there's automated ways to do that too).

    Comments on this post

    • msteudel agrees

IMN logo majestic logo threadwatch logo seochat tools logo