Setting amount of time to pass when sending emails in a loop
- by Obay
Forgive me for this noob question, but is there such a setting that sets a certain amount of time (e.g. milli/seconds) that has to pass in between sending emails through a script? How is that setting called and where do I change that setting?
I'll give an example:
I used to have a PHP script that sends emails like so:
for ($i=0; $i<count($emails); $i++) {
mail($email[$i],'test','test');
}
It turned out that not all emails were sent successfully because the script ran so fast that there was not enough time in between sending emails that was required by the server.
Did I make sense?