Class IMAP_Admin

Description

The IMAP_Admin:: class allow managing of mailboxes on IMAP servers.

Required parameters:

   'admin_user'      The name of a user with admin privileges.
   'admin_password'  The password of the adminstrator.

Optional parameters:

   'hostspec'       The hostname or IP address of the server.
                    DEFAULT: 'localhost'
   'port'           The server port to which we will connect.
                    IMAP is generally 143, while IMAP-SSL is generally 993.
                    DEFAULT: 143
   'protocol'       The connection protocol (e.g. 'imap', 'pop3', 'nntp').
                    Protocol is one of 'imap/notls' (or only 'imap' if you
                    have a c-client version 2000c or older), 'imap/ssl',
                    or 'imap/ssl/novalidate-cert' (for a self-signed
                    certificate).
                    DEFAULT: 'imap'
   'userhierarchy'  The hierarchy where user mailboxes are stored.
                    DEFAULT: 'user.'
   'dsn'            The full IMAP connection string.
                    If not present, this is built from 'hostspec', 'port'
                    and 'protocol' parameters.

$Horde: framework/IMAP/IMAP/Admin.php,v 1.5.6.13 2009/01/06 15:23:11 jan Exp $

Copyright 2004-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /IMAP/IMAP/Admin.php (line 38)


	
			
Variable Summary
 resource $_imap
 array $_params
Method Summary
 IMAP_Admin IMAP_Admin (array $params)
 mixed addMailbox (string $mailbox)
 mixed listMailboxes ()
 mixed mailboxExists (string $mailbox)
 mixed removeMailbox (string $mailbox)
 resource|object _connect ()
Variables
resource $_imap (line 52)

IMAP resource.

array $_params (line 45)

Parameter hash.

Methods
Constructor IMAP_Admin (line 59)

Constructor.

IMAP_Admin IMAP_Admin (array $params)
  • array $params: A hash with all necessary parameters
addMailbox (line 116)

Adds a mailbox.

  • return: True on success or a PEAR_Error object on failure.
mixed addMailbox (string $mailbox)
  • string $mailbox: The mailbox name to add.
listMailboxes (line 192)

List all mailboxes.

Note that this does not work on a virtual-domain enabled Cyrus (it will only return mailboxes in the default domain).

  • return: The array of mailboxes, or a PEAR_Error object on failure.
mixed listMailboxes ()
mailboxExists (line 211)

Check whether a mailbox exists.

  • return: True if mailbox exists, false if not, or a PEAR_Error.
mixed mailboxExists (string $mailbox)
  • string $mailbox: The mailbox to check.
removeMailbox (line 171)

Deletes a mailbox.

  • return: True on success or a PEAR_Error object on failure.
mixed removeMailbox (string $mailbox)
  • string $mailbox: The mailbox to delete.
_connect (line 95)

Connects to the IMAP server with the parameters passed to the constructor.

  • return: An IMAP resource or a PEAR_Error on failure
resource|object _connect ()

Documentation generated on Sun, 30 Jan 2011 05:15:01 +0000 by phpDocumentor 1.4.3