Re: Splitting Header and Body of an Email?
| From: | David Robley | Date: | Thu, 14 Mar 2002 03:27:52 +0000 |
| Subject: | Re: Splitting Header and Body of an Email? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88422@lists.php.net to get a copy of this message | ||
In article <01C1CA7C.C4DA97A0@P01>, j.mueller@pro.vider.de says...
> Hello List,
>
> I'm trying aroung to split the header and the body of an email but
> can't get it to work.
>
> First I read in the email:
>
> $fp = fopen("php://stdin","r");
> $count = 0;
> while (!feof($fp))
> { $data = fgets($fp,4096);
> $data = chop($data);
> $count = $count + 1;
> $content[] = "$data";
> }
> fclose($fp);
>
> and then
>
> for ($x=0; $x <= $count; $x++)
> { $sent_data .= "$content[$x]\n";
> }
>
> Then I tried stuff like
>
> $mail_split = explode("\r\n\r\n",$sent_data);
>
>
> How would it work?
>
> Thanks a lot,
> Juergen
Get rid of the chop - that strips \r and \n amongst other things
--
David Robley
Temporary Kiwi!
Quod subigo farinam