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.
Trigger autoresponder using PHP
Moderator: General Moderators
- launchcode
- Forum Contributor
- Posts: 401
- Joined: Tue May 11, 2004 7:32 pm
- Location: UK
- Contact:
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.
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.