I'm haxing on yet another webmail, having created a mail parser
once before for a proprietary system I did not want to do that
again. Luckily
EzComponents
has a mail parser integrated. Of some weird reason it does not
support reading raw maildir files - so I created the following
function - you will need to add it to the class
ezcMailParser.
[CODE]
public function parseFile($filename)
{
$this->partParser = new
ezcMailRfc822Parser();
$data = "";
//read lines here!
$fp =
fopen($filename,'r');
while ( !feof($fp) )
{
$data =
fgets($fp);
$this->partParser->parseBody( $data );
}
fclose($fp);
return
$this->partParser->finish();
}
[/CODE]