|
Posted by J.O. Aho on 09/28/05 19:49
Neil Trigger wrote:
> What's the best way to mail a lot of people the same thing (newsletter, not
> spam) without them seeing each other's email address? I have around 500
> subscribers, but think that if I try BCC for all of them it may crash, if I
> try to mail 500 individuals it may just time out.
There are hosts that don't allow big Bcc, as it's usually thought as spam (my
mail server classes all Bcc as spam).
Depending how you are executing your script, you may or may not have trouble
with the "time out", if from a cron job, then you don't have to worry about
the "time out", if from a web page, then you need to do something to keep the
connection alive, simple solution to this is to have a character sent every
10th mail
for($i=0;$i < $num_members; $i++) {
mail_to($address[$i]);
if(($i/10)=0) {
echo ".";
}
}
This way it shouldn't time out as you will have a "." sent every tenth message
mailed and in the end you should have a line with 50 dots. If you want to
use Bcc, then make smaller groups, maybe 10 in each group, so that SMTPs using
Bcc size limitations won't block.
//Aho
Navigation:
[Reply to this message]
|