corbin Posted November 22, 2006 Share Posted November 22, 2006 So I know that php can send email through the mail function, but if i was to send ~1000 emails in a while loop it seems like that would take forever and majorly stress the server... What would be a better method to do this? Link to comment https://forums.phpfreaks.com/topic/28169-best-way-to-send-1000-emails/ Share on other sites More sharing options...
DeathStar Posted November 22, 2006 Share Posted November 22, 2006 it shud be very easy to do!it shud be similar to sendin an email to all your membersbut unfortanatly i dont srry! :( Link to comment https://forums.phpfreaks.com/topic/28169-best-way-to-send-1000-emails/#findComment-128860 Share on other sites More sharing options...
corbin Posted November 22, 2006 Author Share Posted November 22, 2006 I could easily send emails in a while loop from results pulled from a DB, but that seems like it would be resource intensive... I guess i could build the to field by a while loop and like $to .= ... but then the mail server would go crazy and the emails would be shown to everyone it was mailed to... Link to comment https://forums.phpfreaks.com/topic/28169-best-way-to-send-1000-emails/#findComment-128864 Share on other sites More sharing options...
AndyB Posted November 23, 2006 Share Posted November 23, 2006 [quote author=corbin link=topic=115974.msg472337#msg472337 date=1164237613] ... What would be a better method to do this?[/quote]Count the number sent and every 100 (or so) use php's sleep() function to give the script a few seconds delay and avoid any overload on the mail server. Link to comment https://forums.phpfreaks.com/topic/28169-best-way-to-send-1000-emails/#findComment-128876 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.