Re: working with file and mail
| From: | WebDev | Date: | Tue, 04 Mar 2003 01:20:07 +0000 |
| Subject: | Re: working with file and mail | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137972@lists.php.net to get a copy of this message | ||
I just got it working with this following code and again the problem the
first person in the list gets a perfect email, 2 person will see the first
person emailed in the list and so on.... the third sees the 2 and 1.... I
got 1000 entries in the file and it is unexceptable to let person nr. 800
see 799 reply addresses !
<?php
$file= file('data/default2.users');
foreach($file as $line){
list ($User, $UserN, $Pass, $Date, $Realf, $RealL, $Email, $Street,
$City, $State, $Postal, $Country, $Phone, $Webaddress, $ex1, $ex2, $ex3,
$ex4, $ex53, $ex7, $ess ) = explode ("|", $line);
$myname = "MyName";
$myemail = "email@domain.com";
$myreplyemail = "email@domain.com;
$contactname = "$Realf $RealL";
$contactemail = "$Email";
$message = "Dear $Realf $RealL <br> Text here.....";
$subject = "Subject here";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$myname." <".$myemail.">\r\n";
$headers .= "To: ".$contactname." <".$contactemail.">\r\n";
$headers .= "Reply-To: ".$myname." <$myreplyemail>\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: Server";
mail($contactemail, $subject, $message, $headers);
echo "<font face=\"Arial\" size=\"1\" color=\"#000000\">
Sendit mail to
$Realf $RealL done ...</font><br> ";
}
?>
what is now wrong ?
Thank you very much for any input
> Impossible. The list() = split() construct will initialize any variables
> that do not contain values so it cannot possibly be a security risk. User
> 100 cannot possibly see user 99's email address unless user 99's email
> address is on line 100. If you want to be absolutely certain then
> initialize your variables before you split the line.
>