Jump to content


Photo

Is there any risk at sending email in loop instead of using a mailing list?


  • Please log in to reply
2 replies to this topic

#1 jcavard

jcavard
  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 21 March 2006 - 01:58 PM

Is there any risk at sending email in loop?

some thing like

while($data = mysql_fetch_assoc($result){
    mail($data['email'],$data['name'] "blahblah",$header);
}

instead of using a mailing list???

#2 micah1701

micah1701
  • Members
  • PipPipPip
  • Advanced Member
  • 613 posts
  • LocationEllington, CT USA

Posted 21 March 2006 - 02:06 PM

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)
"Confidence in the face of risk."

#3 jcavard

jcavard
  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 21 March 2006 - 02:13 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users