MailCclient

The MailCclient package provides a Perl interface to the c-client libraries. The c-client libraries provide access to a large number of different mailbox formats, including remote IMAP mailboxes. The c-client libraries must be installed locally for this module to work. Notice that this is a slightly different approach to mailbox access than the one taken by MailFolder, described next. MailCclient was written by Malcolm Beattie ().

Contents:

  • Cclient.pm

Version Documented: 0.2 dated 14 April 1998

Dependencies:

  • The University of Washington imapd source distribution (e.g., 4.1.BETA) is needed to build the c-client library (c-client/c-client.a).

In order to use MailCclient, you need to make sure some other packages are installed on your system. The dependencies for MailCclient are as follows:

Mail::Cclient Synopsis:

Constructors:
    Cclient new (String mailbox, String[] options)

Public instance methods:
    String[] fetchstructure (Cclient client, int msgno)
    String[] fetchstructure (Cclient client, int msgno, String[] flags)
    String fetchheader (Cclient client, int msgno)
    String fetchheader (Cclient client, int msgno, String[] flags)
    String fetchtext (Cclient client, int msgno)
    String fetchtext (Cclient client, int msgno, String[] flags)
    String fetchbody (Cclient client, int msgno, int section)
    String fetchbody (Cclient client, int msgno, int section, String[] flags)
    boolean create (Cclient client, String mailbox)
    boolean delete (Cclient client, String mailbox)
    boolean rename (Cclient client, String oldname, String newname)
    int nmsgs (Cclient client)
    String mailbox (Cclient client)
    String use (Cclient client)
    boolean rdonly (Cclient client)
    boolean anonymous (Cclient client)
    boolean halfopen (Cclient client)
    String recent (Cclient client)

Callbacks:
    Mail::Cclient::set_callback KEY => CODE, ...
    (See POD in Cclient for details)

Static usage:
    String Mail::Cclient::rfc822_base64 (String source)
    String Mail::Cclient::rfc822_qprint (String source)

The following example uses Cclient.pm to open a local mailbox and get the number of messages that are in it. The mailbox is then closed.

# Use Cclient.pm.
use Mail::Cclient;

Open a mailbox.
$c = Mail::Cclient->new("/var/spool/mail/dwood");

# Get the number of messages in the mailhox.
$nmsgs = $c->nmsgs;

# Close the mailbox.
$c->close;
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.171.121