RE: [PHP] Help on e-mail attachments retrieval adn ZIP uncompression.
| From: | Richard Heyes | Date: | Mon, 03 Sep 2001 16:40:41 +0000 |
| Subject: | RE: [PHP] Help on e-mail attachments retrieval adn ZIP uncompression. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-65769@lists.php.net to get a copy of this message | ||
> 1) How to retrieve messages from a POP3 mailbox and save only
> the ZIP files attachments?
A couple of ways.
1. Use the imap (it does pop3 too) extension to connect to the mail
server, parse the mails and extract the zip files.
2. Use mime decoding php scripts. There's one I've just committed to
PEAR, which you can get by going to cvs.php.net --> php4 --> pear -->
mail --> mimeDecode.php. It's beta quality at the moment, but should get
better. Also, this is just a class/object, so it will require
incorporating into your own scripts.
> 2) How to decompress the ZIP files?
If you're on unix, exec('unzip ...'). Or if windows, you can use the cmd
line version of winzip.
--
Richard Heyes