Forums

Reminder/Follow Up Emails - Time Delay on Email Response

Origin Corp 28 Apr, 2009
I was wonder if it would be possible to set up a time delay on one of the emails that was automatically sent once the form has been filled in?

When the visitor completes my form currently two emails are sent out immediately:
1) To the administrator - With the visitors details as entered in the form
2) Dynamically to Visitors email address - With information based their selection form a drop down box (Thank you to the forum for teaching me how to use the PHP switch & select function)

The visitor is then taken to the "On Submit code - after sending email" which thanks them completing the form

If it is possible I would like to have a third email sent out 48 or 72 hours after the form has been filled in which would remind the user to act on the information which was sent to them or prompt them to email the administrator for additional assistance, basically a reminder/follow up email.

Feel free to tell me "I'm Dreaming" if this is not possible.

Thanks in advance.

Lloyd
GreyHead 28 Apr, 2009
Hi Lloyd,

It would be valuable - the problem is that PHP Has no sense of time and is a completely reactive language. Nothing happens until a user goes to a web page or clicks a button.

Scheduling emails is easy enough, you can just enter them into a database table with a desired sending time. You then need a little daemon to check the table from time to time and send out anything that's due.

There are two ways of doing this that I know of. One is to use a 'cron' job - a *nix feature that you can enable from your ISP's CPanel outside of Joomla that will schedule a PHP file to run at fixed times. The other is to add a code snippet to the bottom on some or all of your site pages that triggers a file to run in the background and do the same thing. If your site has a reasonable number of hits this will be a fair proxy for a cron job.

There used to be a couple of sites around the web that would do timed hits for you - I guess that there may still be but I don't know of any right now.

Bob
Origin Corp 28 Apr, 2009
Hi Bob,

Thankyou very much for taking the time to explain this to me.

I will continue in the quest to find a way to deal with customers, without actually having to deal with them.

Thankyou again.

Lloyd
This topic is locked and no more replies can be posted.