Class Horde_Kolab_IMAP_cclient

Description

The Horde_Kolab_IMAP_Connection_cclient class connects to an IMAP server using the IMAP functionality within PHP.

$Horde: framework/Kolab_Server/lib/Horde/Kolab/IMAP/cclient.php,v 1.1.2.2 2009/01/06 15:23:15 jan Exp $

Copyright 2007-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 /Kolab_Server/lib/Horde/Kolab/IMAP/cclient.php (line 23)

Horde_Kolab_IMAP
   |
   --Horde_Kolab_IMAP_cclient
Variable Summary
 string $_base_mbox
 string $_login
 string $_mbox
 string $_password
 string $_signature
Method Summary
 mixed appendMessage (string $msg)
 boolean|PEAR_Error connect (string $login, string $password, [boolean $tls = false])
 mixed copyMessage (integer $uid, string $new_folder)
 mixed create (string $folder)
 string current ()
 mixed delete (string $folder)
 mixed deleteACL (string $folder, string $user)
 mixed deleteMessages (integer $uids)
 mixed disconnect ()
 mixed exists (string $folder)
 mixed expunge ()
 mixed getACL (string $folder)
 mixed getAnnotation (string $entries, string $value, string $mailbox_name)
 mixed getMailboxes ()
 mixed getMessage (integer $uid)
 mixed getMessageBody (integer $uid)
 mixed getMessageHeader (integer $uid, [boolean $peek_for_body = true])
 mixed getMyRights (string $folder)
 mixed getUids ()
 mixed moveMessage (integer $uid, string $new_folder)
 mixed rename (string $old, string $new)
 mixed search (string $search_list)
 mixed searchHeaders (string $field, string $value)
 mixed select (string $folder)
 mixed setACL (string $folder, string $user, string $acl)
 mixed setAnnotation (string $entries, array $values, string $mailbox_name)
 array status ()
 mixed undeleteMessages (integer $uid)
 mixed _connect ()
Variables
string $_base_mbox (line 30)

Basic IMAP connection string.

string $_login (line 51)

IMAP user name.

string $_mbox (line 37)

IMAP connection string that includes the folder.

string $_password (line 58)

IMAP password.

string $_signature (line 44)

The signature of the current connection.

Inherited Variables

Inherited from Horde_Kolab_IMAP

Horde_Kolab_IMAP::$_imap
Horde_Kolab_IMAP::$_port
Horde_Kolab_IMAP::$_reuse_detection
Horde_Kolab_IMAP::$_server
Methods
appendMessage (line 632)

Appends a message to the current folder.

  • return: True or a PEAR error in case of an error.
mixed appendMessage (string $msg)
  • string $msg: The message to append.
connect (line 70)

Connects to the IMAP server.

  • return: True in case the connection was opened successfully.
boolean|PEAR_Error connect (string $login, string $password, [boolean $tls = false])
  • string $login: The user account name.
  • string $password: The user password.
  • boolean $tls: Should TLS be used for the connection?
copyMessage (line 656)

Copies a message to a new folder.

  • return: True or a PEAR error in case of an error.
mixed copyMessage (integer $uid, string $new_folder)
  • integer $uid: IMAP message id.
  • string $new_folder: Target folder.
create (line 188)

Create the specified folder.

  • return: True in case the operation was successfull, a PEAR error otherwise.
mixed create (string $folder)
  • string $folder: The folder to create.
current (line 774)

Return the currently selected mailbox

  • return: The mailbox currently selected
string current ()
delete (line 213)

Delete the specified folder.

  • return: True in case the operation was successfull, a PEAR error otherwise.
mixed delete (string $folder)
  • string $folder: The folder to delete.
deleteACL (line 620)

Delete the access rights for a user.

  • return: True if successfull, a PEAR error otherwise.
mixed deleteACL (string $folder, string $user)
  • string $folder: The folder that should be modified.
  • string $user: The user that should get the ACLs removed
deleteMessages (line 703)

Deletes messages from the current folder.

  • return: True or a PEAR error in case of an error.
mixed deleteMessages (integer $uids)
  • integer $uids: IMAP message ids.
disconnect (line 120)

Disconnects from the IMAP server. If not really necessary this should not be called. Once the page got served the connections should be closed anyhow and if there is a chance to reuse the connection it should be used.

  • return: True in case the connection was closed successfully, a PEAR error otherwise.
mixed disconnect ()
exists (line 171)

Does the given folder exist?

  • return: True in case the folder exists, false otherwise
mixed exists (string $folder)
  • string $folder: The folder to check.
expunge (line 753)

Expunges messages in the current folder.

  • return: True or a PEAR error in case of an error.
mixed expunge ()
getACL (line 542)

Retrieve the access rights from a folder

  • return: An array of rights if successfull, a PEAR error otherwise.
mixed getACL (string $folder)
  • string $folder: The folder to retrieve the ACLs from.
getAnnotation (line 482)

Fetches the annotation on a folder.

  • return: The annotation value or a PEAR error in case of an error.
mixed getAnnotation (string $entries, string $value, string $mailbox_name)
  • string $entries: The entry to fetch.
  • string $value: The specific value to fetch.
  • string $mailbox_name: The name of the folder.
getMailboxes (line 447)

Retrieves a list of mailboxes on the server.

  • return: The list of mailboxes or a PEAR error in case of an error.
mixed getMailboxes ()
getMessage (line 426)

Retrieves the full message text for a given message id.

  • return: The message text or a PEAR error in case of an error.
mixed getMessage (integer $uid)
  • integer $uid: The message id.
getMessageBody (line 402)

Retrieves the message body for a given message id.

  • return: The message body or a PEAR error in case of an error.
mixed getMessageBody (integer $uid)
  • integer $uid: The message id.
getMessageHeader (line 373)

Retrieves the message headers for a given message id.

  • return: The message header or a PEAR error in case of an error.
mixed getMessageHeader (integer $uid, [boolean $peek_for_body = true])
  • integer $uid: The message id.
  • boolean $peek_for_body: Prefetch the body.
getMyRights (line 566)

Retrieve the access rights from a folder not owned by the current user

  • return: An array of rights if successfull, a PEAR error otherwise.
mixed getMyRights (string $folder)
  • string $folder: The folder to retrieve the ACLs from.
getUids (line 285)

Returns the uids of the messages in this folder.

  • return: The message ids or a PEAR error in case of an error.
mixed getUids ()
moveMessage (line 680)

Moves a message to a new folder.

  • return: True or a PEAR error in case of an error.
mixed moveMessage (integer $uid, string $new_folder)
  • integer $uid: IMAP message id.
  • string $new_folder: Target folder.
rename (line 239)

Rename the specified folder.

  • return: True in case the operation was successfull, a PEAR error otherwise.
mixed rename (string $old, string $new)
  • string $old: The folder to rename.
  • string $new: The new name of the folder.
search (line 310)

Searches the current folder using the given list of search criteria.

  • return: The list of matching message ids or a PEAR error in case of an error.
mixed search (string $search_list)
  • string $search_list: A list of search criteria.
searchHeaders (line 336)

Searches the headers of the messages. c-client does not allow using "HEADER" as it is possible with Net/IMAP, so we need a workaround.

  • return: The list of matching message ids or a PEAR error in case of an error.
mixed searchHeaders (string $field, string $value)
  • string $field: The name of the header field.
  • string $value: The value that field should match.
select (line 146)

Opens the given folder.

  • return: True in case the folder was opened successfully, a PEAR error otherwise.
mixed select (string $folder)
  • string $folder: The folder to open.
setACL (line 596)

Set the access rights for a folder

  • return: True if successfull, a PEAR error otherwise.
mixed setACL (string $folder, string $user, string $acl)
  • string $folder: The folder to retrieve the ACLs from.
  • string $user: The user to set the ACLs for
  • string $acl: The ACLs
setAnnotation (line 516)

Sets the annotation on a folder.

  • return: True if successfull, a PEAR error otherwise.
mixed setAnnotation (string $entries, array $values, string $mailbox_name)
  • string $entries: The entry to set.
  • array $values: The values to set
  • string $mailbox_name: The name of the folder.
status (line 262)

Returns the status of the current folder.

  • return: An array that contains 'uidvalidity' and 'uidnext'.
array status ()
undeleteMessages (line 732)

Undeletes a message in the current folder.

  • return: True or a PEAR error in case of an error.
mixed undeleteMessages (integer $uid)
  • integer $uid: IMAP message id.
_connect (line 101)

Lazy connect to the IMAP server.

  • return: True in case the connection was opened successfully, a PEAR error otherwise.
mixed _connect ()

Inherited Methods

Inherited From Horde_Kolab_IMAP

 Horde_Kolab_IMAP::Horde_Kolab_IMAP()
 Horde_Kolab_IMAP::factory()
 Horde_Kolab_IMAP::singleton()

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