hi. do anyone know how to parse an email?
i have to following code in retrieving email:
$status = $pop3->get_office_status();
if ($status == false) {
die($pop3->error);
}
$count = $status['count_mails'];
if ($count == '0') {
echo 'There are no new e-mails';
}
for ($i = 1; $i <= $count; $i++) {
$email = $pop3->get_mail($i);
if ($email == false) {
echo $pop3->error;
continue;
}
$email = parse_email ($email);
echo '<b>From: </b>' . htmlentities($email['headers']['From']) . '<br />';
echo '<b>Subject: </b>' . htmlentities($email['headers']['Subject']) . '<br /><br />';
echo nl2br(htmlentities($email['message']));
echo '<hr />';
}
$pop3->close();
but the result is like this:
From: me <me@yahoo.com>
Subject: from yahoo
----------------------------------------------------------
--0-453050647-1160101123=:5991
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
is there such headers?
---------------------------------
Stay in the know. Pulse on the new Yahoo.com. Check it out.
--0-453050647-1160101123=:5991
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
is there such headers?<br><p> 
<hr size=1>Stay in the know. Pulse on the new Yahoo.com. <a href="http://us.rd.yahoo.com/evt=42974/*http://www.yahoo.com/preview"> Check it out.</a>
--0-453050647-1160101123=:5991--
i only want to show the message which is --->
is there such headers?
thanks for any help you could extend...