Re: evaluate my mailing list attempt?

From: Date: Mon, 15 Apr 2002 14:58:16 +0000
Subject: Re: evaluate my mailing list attempt?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93010@lists.php.net to get a copy of this message
looks fine but i would change this: > $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 to > $subject="Newsletter"; > $msg="Hello $list2[0], bla bla bla"; //include name in message > mail("$list2[1],$subject,$msg"); //individual mail during if you do not need $to later. "Police Trainee" <policetrainee@yahoo.com> schrieb im Newsbeitrag news:20020415074325.81239.qmail@web11708.mail.yahoo.com... > 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 (#93010) next »