Source Rally PHP Community Scripts .. Sign up .. Login
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]

Sign up to add your own comment here!

All user contributed content is available under the LGPL unless specified otherwise.
Remaining copyrights Regin Gaarsmand © 2006-2008
About SourceRally.net
Adelgazar sin trucos Programador PHP