This class can be used to retrieve and parse e-mail messages from a POP3 or IMAP using the PHP IMAP extension.
It can connect to a mail server, retrieve the total number of messages in a mailbox, retrieve the headers, body and attachment files of a given message, and delete a message.