>          $message = $buffer;
>          echo $message; <it will work if I  add this echo but this is

You want:

$message .= $buffer;

This *APPENDS* $buffer to $message.  Before you were wiping out each line
after you got it.
Your echo will now show 1 line, then 2 lines, then 3 lines, etc as the
message "builds", but the mail() will work.


And you need "\r\n" for any place you want a newline.

So, probably:

$message .= "$buffer\r\n";

is your final code.

Actually, you could optimize it a bit by use fread($fp, filesize($path)) and
suck the whole file in as one big chunk of text.

Only matters if he's sending lots of email though, and that will choke the
mail() function anyway.  See Manuel Lemos' UpperDesign.com mail class for
how to spew mass quantities of email out.

Oh yeah:  It's called "pArsing" with an "A".  I think I like pursing better,
though :-)

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to