Hi all,
I've an interesting problem here. Here's the scenario. This script is
sending emails for our company newsletter. It used to run the script
once, but now I need to call the script multiple times and send out
batches of emails. This is because I need to slow down the rate at
which the emails are going out. I've got that working nicely, but
here's the problem. If I call the script by itself, it reloads over
and over fine until all emails have been sent. But, because I am
wanting the script to work in the background, and not have to have
the browser window open during the sending, I load another page after
about two seconds of time has passed to monitor the progress via ajax
and mysql. The problem is when I do that, the script that sends the
mail will not reload. I was under the impression that it would keep
reloading in the background until I said stop, but that is not
happening. I am using the header('Location: .....') to reload the
page. Is there another way to reload the page until it's done running
the times I need it to run? Should I not use the header() call but
something else?
Any help is greatly appreciated.
Thanks,
Mark