Page 1 of 1

Trigger autoresponder using PHP

Posted: Sat May 15, 2004 4:29 am
by mancroft
Trigger autoresponder using PHP

I am doing an autoresponder where a user types their email address into a form and then they get sent a response. I know how to do this.

But, in addition, I want to send further (different) messages automatically. Say, one a week later and another a week after that.

What is the best way to set the time for these messages in PHP?

I need to use PHP to trigger sending the messages.

PLEASE do not suggest setting a cron job manually it must be done using the PHP script.

Posted: Sat May 15, 2004 4:50 am
by mjseaden
As far as I'm aware, if you want an script to be run but you're not actually there to do it, cron is the only way. I don't understand what you mean 'cron job manually' - cron allows you to schedule running of scripts automatically at given times. It's great.

Mark

Posted: Sat May 15, 2004 5:35 am
by launchcode
It cannot be done using a pure PHP script unless you want to have that script open in a browser, refreshing every second, waiting for the right time to send stuff out (which is far from ideal!)

You will need to use something similar to cron (or cron itself if available) to call your php script every X hours/days/weeks/blah.