Hi, Because a lot of hosts have limits on how many e-mails can be sent at a time, example my host says no more than 500 per hour, and no faster than 1 per 6 seconds. i want to right a function that can get the member's e-mails from the MySQL table, and send them according to the limits set by the host, which I will put in variables so i can change them later if i switch hosts. i will be using the standard php mailto function, if possible. Currently my host does not allow sending via smtp scripts, not sure how they know the difference between outlook sending from my desktop, and smtp script on my site sending them, but oh well. can anyone point me in the right direction? Not asking you to write the script, although if you already have one, I would like to look at it to modify it for my needs. Using php 5.2.6 Thanks, Michael
You can use the sleep() function: http://ca.php.net/sleep Check out the code samples in the comments!
Thanks, that did help. There were no code examples in the php.net area for what I was looking for, but I got something pieced together that might work. I can post it here if anyone else is interested. Thanks, Michael
Here you can use sleep(seconds) function. which stop the execution for the given seconds. but if you are sending more emails then u have to increase the execution timeout. Use: ini_set('max_execution_time', 1200); ini_set("memory_limit","50M"); put this code in very first line of script file. this code will continue your script to 1200 seconds. pls change the seconds to your require time limit. Hope it will solve your prob. cheers
sandeep_india thanks for the tip, I will keep that in mind if i am ever sending that many message at a time, but I hope if i am sending out that many, I am on at least a VPS, if not a dedicated box. Thanks, Michael