Splitting Header and Body of an Email?
| From: | J.Mueller, pro.vider.de GmbH | Date: | Wed, 13 Mar 2002 09:49:35 +0000 |
| Subject: | Splitting Header and Body of an Email? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-88307@lists.php.net to get a copy of this message | ||
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