7/25/2007

Accessing your email from perl through IMAPClient

There is great IMAP Client API (Mail::IMAPClient - An IMAP Client API) you can use to basically generate your own email client using Perl. I have built my own email searcher from scratch using this API. Functions are easy to use and if you want to do any automation work based on received email, this is easy way to have it implemented.

DESCRIPTION ^

This module provides methods implementing the IMAP protocol.It allows perl scripts to interact with IMAP message stores.

The module is used by constructing or instantiating a new IMAPClient object via the new constructor method.
Once the object has been instantiated,the connect method is either implicitly or explicitly called.At that point methods are available that implement the IMAP client commands as specified in RFC2060.When processing is complete,the logoff object method should be called.

This documentation is not meant to be a replacement for RFC2060,and the wily programmer will have a copy of that document handy when coding IMAP clients.

Note that this documentation uses the term folder in place of RFC2060's use of mailbox.This documentation reserves the use of the term mailbox to refer to the set of folders owned by a specific IMAP id.

RFC2060 defines four possible states for an IMAP connection: not authenticated,authenticated,selected,and logged out.These correspond to the IMAPClient constants Connected,Authenticated,Selected,and Unconnected,respectively.These constants are implemented as class methods,and can be used in conjunction with the Status method to determine the status of an IMAPClient object and its underlying IMAP session.Note that an IMAPClient object can be in the Unconnected state both before a server connection is made and after it has ended.This differs slightly from RFC2060,which does not define a pre-connection status.For a discussion of the methods available for examining the IMAPClient object's status,see the section labeled "Status Methods",below.


Technorati Tags: , ,

Powered by ScribeFire.

No comments: