Jump to content

[SOLVED] sending a lot of mail


jakebur01

Recommended Posts

If I have say a thousand or so of my customers e-mails to send out, is their a way that I could set the execution time at the beginning of the script and loop through sending an e-mail to each individual one by one and pausing in between?

 

Like, I know the browser might time out after 30 seconds if it does not receive any new data. Could I run a loop that would send a message to the browser every 10 seconds while running the sleep/mail loop.

 

Ex.

 

Loop to browser to keep it going -

 

Send e-mail  ----  sleep for a minute or so --- and send the next e-mail -- sleep -- and so on

 

Thanks,

 

Jake

Link to comment
https://forums.phpfreaks.com/topic/72557-solved-sending-a-lot-of-mail/
Share on other sites

I suppose if you have the emails in a database or a falt file you could do a foreach loop on each

 

soemthing like

 


while ($row = mysql_fetch_array($result))
{
mail($name,$subject,$body)

}

 

I know thats simplistic but without knowing if you have a database or what variables they're stored in, but something like that should work

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.