Re: PHP to get mail headers
| From: | Al | Date: | Mon, 24 Nov 2003 02:54:07 +0000 |
| Subject: | Re: PHP to get mail headers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170754@lists.php.net to get a copy of this message | ||
"Scott St. John" <scott@scottah.com> wrote in message
news:Pine.LNX.4.50.0311232028460.8981-100000@kelly.talon.net...
> A search did not yield much in what I am trying to do:
> 1)Open the mailbox and extract the Received, From and Subject headers.
> 2)Drop those into a database that I can manage from the browser.
There are two PEAR packages that can help you with this:
1) Mail_Mbox will parse and manipulate mbox files so you can traverse your
mail file and pull out individual messages.
http://pear.php.net/package/Mail_Mbox
2) Mail_Mime contains classes for decoding and parsing individual messages.
http://pear.php.net/package/Mail_Mime
Hope it helps.
Al