Jump to content

running the script for a long time


123qwertyuiop456

Recommended Posts

[color=red][size=16pt]Hi![/size][/color]
User writes a message, than it should be posted to 300-800 e-mails.

Firstly I-ve made message.html and mailer.php. User writes message in message.html, then clics submit, and than the script runs:

[code]
/*mailing...    mailing...*/
header("Location: .........");
[/code]

But, unfortunately, in this case user has to wait for long time, before he'll be redirected.

How to let user go for another location, leaving the mailing script?
Link to comment
Share on other sites

one random solution: when the user clicks submit, put the message and sender and whatever other info in a "queue" in your database and have a seperate script go to your "queue" and grab the info (and delete it after it gets it) every minute or whatever using a cron job, and have that seperate script do the mail sending.  then you could redirect the user somewhere else instantly, or whatever. but there's probably a better solution.  i've never done mass mailer type scripts, so i don't know all the "tricks" to it.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.