jcavard Posted March 21, 2006 Share Posted March 21, 2006 Is there any risk at sending email in loop?some thing like[code]while($data = mysql_fetch_assoc($result){ mail($data['email'],$data['name'] "blahblah",$header);}[/code]instead of using a mailing list??? Quote Link to comment https://forums.phpfreaks.com/topic/5422-is-there-any-risk-at-sending-email-in-loop-instead-of-using-a-mailing-list/ Share on other sites More sharing options...
micah1701 Posted March 21, 2006 Share Posted March 21, 2006 what do you mean by a mailing list? like just putting everyone in the "To:" field?if you have a true "list" (like a comma delimited one) then you would still be using a loop to go through each name on the list and send them an e-mail.if you mean a 3-rd party application "mailing list" program, then it depends on how they send the mail. chances are it uses a loop to.Can't think of much in the way of risks to using the loop - other then it can take a while if you don't do it write.NOTE: make sure you "GROUP BY emailAddress" in your query, so that you don't send the email to the same person if they are listed more then once w/ the same address (unless you are using the emailAddress column as a primary id) Quote Link to comment https://forums.phpfreaks.com/topic/5422-is-there-any-risk-at-sending-email-in-loop-instead-of-using-a-mailing-list/#findComment-19341 Share on other sites More sharing options...
jcavard Posted March 21, 2006 Author Share Posted March 21, 2006 thank you, I meant a 3rd party mailing list software, cause it needs plenty of PERL and admin rights to install them on software, and I dont have these rights. anyway, it answers my question, thank you. Quote Link to comment https://forums.phpfreaks.com/topic/5422-is-there-any-risk-at-sending-email-in-loop-instead-of-using-a-mailing-list/#findComment-19343 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.