evaluate my mailing list attempt?

From: Date: Mon, 15 Apr 2002 21:24:35 +0000
Subject: evaluate my mailing list attempt?
Groups: php.general 
Request: Send a blank email to php-general+get-93093@lists.php.net to get a copy of this message
Well, constructed from the help i received from some of you, this is the end result of my attempts to be able to send email to everyone listed in a file and including their names in the email. i would appreciate any feedback or suggestions for simplification, etc. <?$doc="emaillist.dat";$fp=fopen("$doc","r"); $contents = fread ($fp,filesize $doc)); fclose($fp);//read file contents into variable $list=explode("\n",$contents); //explode each dataset into array $size=count($list);//count number of array items $size=$size-1;//subtract one for looping process $counter=0;//set counter while($counter<$size){ //do until no more array items $list2=explode("#",$list[$counter]); //explode each dataset into two separate arrays (name/email) $to=$list2[1];//set "to" to email address $subject="Newsletter"; $msg="Hello $list2[0], bla bla bla"; //include name in message mail("$to,$subject,$msg"); //individual mail during loop $counter++; //increment } ?> i know several of you have expressed concerns about overloading email servers, but since i have less than 20 people on the list, i'm sure it can handle it. __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/

« previous php.general (#93093) next »