Results 1 to 5 of 5
Sep 6, 2001, 07:41 #1
- Join Date
- Oct 2000
- 0 Post(s)
- 0 Thread(s)
sleep() function for delay e-mail
I've used the sleep function before and its quite useful. However I was thinking that I could possibley use it for the following:-
I have a formmail script which takes orders on my sites and then e-mails them to me.
What I would like to do is set up an 'Auto-responder' to mail the customer that their order has been recieved and we are looking into it. However, I think auto responders are rather impersonal and not a great deal of use (due to the fact people easily recognise it as a robot).
To get round this I want to do two thinks: -
The first is to put the persons first name in the Dear "Persons Name" part of the e-mail - this I can do.
However, the next thing I want to do is set it up so the response is sent approaximately 15 minutes after the order is processed - this will make it look like 'someone' has recieved the mail looked at it and sent a prompt reply (instant=robot 15mins=prompt reply) - thants my thinking.
So the only simple way I can think of doing this is to get the script to sleep() for 15mins then continue.
Can you do this ? My thinking is that the script may terminate if the user moves off the page.
Any thoughts ??
PS I may even take it a step further by making a rand() number of minutes before reply - but always prompt - HeHe
Last edited by ChilliBoy; Sep 6, 2001 at 07:43.