Re: reading/parsing mbox file

From: Date: Thu, 24 Apr 2003 14:42:19 +0000
Subject: Re: reading/parsing mbox file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145162@lists.php.net to get a copy of this message
Andy Clarke wrote:
Is it possible to open and read a local mbox mailbox file using PHP? I know that it is only a text file, and I can parse it myself using regular expressions etc., but are there any functions or libraries to make it easier? IMAP would seem like the obvious choice - I've used it before and it has the sort of functions I need (get message header/body/structure/etc.), but this only seems able to be able to communicate with a local mail server, not to read a local file directly. Is it possible to get the IMAP functions to open and read a local mbox file, and if they can't, is there any alternative set of functions that will do the job, or has anyone already written a set of regular expressions to parse the text file directly? In case it makes any difference, I am working on Mac OSX (Jaguar), trying to read mbox files exported from Entourage. Besides phpclasses.org, I know this has been discussed several times on this list so you will probably find some useful information in the archives.
HTH Chris

« previous php.general (#145162) next »