RE: [PHP] Taking body of an email and storing it in MySQL database
| From: | Jason | Date: | Mon, 07 Sep 2009 13:33:13 +0000 |
| Subject: | RE: [PHP] Taking body of an email and storing it in MySQL database | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-297757@lists.php.net to get a copy of this message | ||
>-----Original Message-----
>From: Dave M G [mailto:martin@autotelic.com]
>Sent: 07 September 2009 14:26
>To: Richard Heyes
>Cc: php-general@lists.php.net
>Subject: Re: [PHP] Taking body of an email and storing it in MySQL database
>
>Richard,
>
>Thank you for responding.
>
>> Sounds like you may have a MIME (an HTML email or one with attachments
>> etc) email to decode.
>
>No, the mails should be in plain text format.
>
I probably didn't describe my issue properly because I don't understand
it fully.
>
>If I can assume all the mails I am receiving are in plain text format -
>which they should be because it is within a controlled environment - can
>I use PHP to pull out each email from the POP server essentially as a
>text file?
>
>I need to find out the sender and subject line, but other than that, the
>rest of it (including headers) I just want to store in MySQL.
Dave,
Take a look on phpclasses.net, they have classes which connect via POP3 and give you arrays of
messages back.
HTH
J