Re: file and mail
| From: | Kelvin | Date: | Fri, 27 Apr 2001 14:30:48 +0000 |
| Subject: | Re: file and mail | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8946@lists.php.net to get a copy of this message | ||
Hi Kancha,
Try this one.
$to=trim($staff[$x]);
Kelvin.
"kancha" <kancha2@excite.com> wrote in message
news:20903299.988205255779.JavaMail.imail@bernie.excite.com...
>
> Hi all
>
> I have a text file with email addresses. Each line contains one email
> address. I read the file using file() function. Below is a snippet of my
> code
>
> $staff = file("staff");
> for($x=0; $x<count($staff); $x++){
> $to = $staff[$x];
> mail($to, "New User Added", $mailBody, "From: sysadmin@foo.com");
> }
>
>
> the snippet does send mail to all the address listed in the file staff but
> the header from of the mail is not sysadmin@foo.com, but when i replace
$to
> with a string like "me@foo.com" everything works fine. The from header is
> set to sysadmin@foo.com and the subject also appears.
>
> I'm using php 4.0.1pl1 with apache 1.3 in a linux box. what could be the
> problem??
>
> kancha
>
>
>
>
>
> _______________________________________________________
> Send a cool gift with your E-Card
> http://www.bluemountain.com/giftcenter/
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>