>>>>> "Lesli" == Lesli Larocco <[EMAIL PROTECTED]> writes:
Lesli> I'm writing a program that will allow users to construct an email message
Lesli> and schedule when the message will be sent (eg for times when the mail
Lesli> server is less busy). I solved the scheduling program by subtracting the
Lesli> "send time" from the "current time" giving me X seconds to wait. Then I use
Lesli> sleep($pause_length) before the next part of the program--mailing--executes.
Lesli> However, I also want the user to receive a Web page that says, yeah, it
Lesli> worked. When I run the program, everything does work, except that the
Lesli> sleep() seems to invoke before the Web page is constructed.
You need to fork if you want to go two different paths...
that is, return a "everything is working" immediately to the user,
and then send some mail later, which has to be done in a separate
thread/process.
As it shows in
http://www.stonehenge.com/merlyn/WebTechniques/col20.html
you can do this rather easily. Just got to do it. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]