Page 1 of 1

Please help me wrap my head around a mailing list problem

Posted: Tue Feb 22, 2005 1:30 pm
by SawkenDotCom
I have a mailing list and I am trying to automate it. I am having some problems with it and I was hoping that someone with more experience could help me organize how I should solve my quandry (not write it, just guide me). Thanks.

My problem:
I have a mailing list of over 1200 accounts (every one has been opted in and any emails out have an automatic "opt out" function plus an email address of where to reach me) but my web host only allows sendouts of 200 emails every 20 minutes. I love the webhost to death and want to keep it. Is it possible to set up a PHP script that once an initial script was triggered (say the subject and body of an email), would then go on to trigger an email script every 20 minutes?

Thanks in advance.

Posted: Tue Feb 22, 2005 1:45 pm
by smpdawg
This question seems like a variation of this viewtopic.php?t=30832.

You could put a LIMIT clause in your SQL statement and a cron job to kick it off at regular intervals.

Posted: Tue Feb 22, 2005 1:52 pm
by SawkenDotCom
Thank you for the reply! I have looked into Cron jobs and it seems like they would be perfect, but can you trigger a cron job with a PHP script? These emails aren't sent out at any specific time.

Posted: Tue Feb 22, 2005 1:55 pm
by feyd
you can set the cron to run a php script.. which the script doesn't have to do anything if there's nothing to send..

Posted: Tue Feb 22, 2005 1:56 pm
by smpdawg
What I have done in the past is just have a recurring cron job that runs a PHP script to check a flag to see if it needs to do any work.

Another thing that I have done for the same reason that you have is that I have set up a private web page the uses setTimeout to refresh periodically. This makes it something that you can kick off manually and you can have the script spit out status info as it runs.