|
Posted by Manuel Lemos on 03/22/07 19:39
Hello,
on 03/22/2007 08:18 AM bill said the following:
> I am in preliminary design of a contact management program. The user
> would like to use his current mail server (POP3 - remote).
>
> I have done some reading on the IMAP functions but am unclear if the
> following is possible:
>
> Using the IMAP functions can I write a PHP script to:
> scan the subject lines of all mail in the mailbox ?
> pop just certain messages from the inbox ?
> delete those messages from the inbox ?
>
> all without disturbing the other messages in his inbox that are
> downloaded to his usual email client (Thunderbird).
>
> If anyone can suggest a better way to do this, I am all ears.
You may want to take a look at this POP3 class. You can use the class
RetrieveMessage function to retrieve just the message headers and get
only the first body lines you need.
http://www.phpclasses.org/pop3class
You can also this MIME message parser class that can decode message and
extract headers that use non-ASCII characters. I think you need that to
filter message by subject or sender, as messages with non-ASCII
characters are encoded with q-encoding like this:
=?iso-8859-1?Q?
http://www.phpclasses.org/mimeparser
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Navigation:
[Reply to this message]
|