Jump to content

Archived

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

jcavard

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

Recommended Posts

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???

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

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.