Overview

Packages

  • Imap
    • Client

Classes

  • Horde_Imap_Client
  • Horde_Imap_Client_Auth_DigestMD5
  • Horde_Imap_Client_Base
  • Horde_Imap_Client_Cache
  • Horde_Imap_Client_Data_Acl
  • Horde_Imap_Client_Data_AclCommon
  • Horde_Imap_Client_Data_AclNegative
  • Horde_Imap_Client_Data_AclRights
  • Horde_Imap_Client_Data_Envelope
  • Horde_Imap_Client_Data_Fetch
  • Horde_Imap_Client_Data_Fetch_Pop3
  • Horde_Imap_Client_Data_Thread
  • Horde_Imap_Client_DateTime
  • Horde_Imap_Client_Exception
  • Horde_Imap_Client_Exception_NoSupportExtension
  • Horde_Imap_Client_Fetch_Query
  • Horde_Imap_Client_Ids
  • Horde_Imap_Client_Ids_Pop3
  • Horde_Imap_Client_Mailbox
  • Horde_Imap_Client_Search_Query
  • Horde_Imap_Client_Socket
  • Horde_Imap_Client_Socket_Pop3
  • Horde_Imap_Client_Sort
  • Horde_Imap_Client_Translation
  • Horde_Imap_Client_Utf7imap
  • Horde_Imap_Client_Utils
  • Horde_Imap_Client_Utils_Pop3
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Imap_Client

Base class for Horde_Imap_Client package. Defines common constants and provides factory for creating an IMAP client object.

Copyright 2008-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Package: Imap\Client
Category: Horde
License: LGPL 2.1
Author: Michael Slusarz slusarz@horde.org
Located at Horde/Imap/Client.php
Methods summary
public static Horde_Imap_Client_Base
# factory( string $driver, array $params = array() )

Attempts to return a concrete Horde_Imap_Client instance based on $driver.

Attempts to return a concrete Horde_Imap_Client instance based on $driver.

Parameters

$driver
The type of concrete subclass to return.
$params
Configuration parameters: <ul> <li>REQUIRED Parameters <ul> <li>password: (string) The IMAP user password.</li> <li>username: (string) The IMAP username.</li> </ul> </li> <li>Optional Parameters <ul> <li> cache: (array) If set, caches data from fetch(), search(), and thread() calls. Requires the horde/Cache package to be installed. The array can contain the following keys (see Horde_Imap_Client_Cache for default values): <ul> <li> cacheob: [REQUIRED] (Horde_Cache) The cache object to use. </li> <li> fetch_ignore: (array) A list of mailboxes to ignore when storing fetch data. </li> <li> fields: (array) The fetch criteria to cache. If not defined, all cacheable data is cached. The following is a list of criteria that can be cached: <ul> <li>Horde_Imap_Client::FETCH_ENVELOPE</li> <li>Horde_Imap_Client::FETCH_FLAGS <ul> <li> Only if server supports CONDSTORE extension </li> </ul> </li> <li>Horde_Imap_Client::FETCH_HEADERS <ul> <li> Only for queries that specifically request caching </li> </ul> </li> <li>Horde_Imap_Client::FETCH_IMAPDATE</li> <li>Horde_Imap_Client::FETCH_SIZE</li> <li>Horde_Imap_Client::FETCH_STRUCTURE</li> </ul> </li> <li> lifetime: (integer) Lifetime of the cache data (in seconds). </li> <li> slicesize: (integer) The slicesize to use. </li> </ul> </li> <li> capability_ignore: (array) A list of IMAP capabilites to ignore, even if they are supported on the server. DEFAULT: No supported capabilities are ignored. </li> <li> comparator: (string) The search comparator to use instead of the default IMAP server comparator. See Horde_Imap_Client_Base#setComparator() for format. DEFAULT: Use the server default </li> <li> debug: (string) If set, will output debug information to the stream provided. The value can be any PHP supported wrapper that can be opened via fopen(). DEFAULT: No debug output </li> <li> encryptKey: (array) A callback to a function that returns the key used to encrypt the password. This function MUST be static. DEFAULT: No encryption </li> <li> hostspec: (string) The hostname or IP address of the server. DEFAULT: 'localhost' </li> <li> id: (array) Send ID information to the IMAP server (only if server supports the ID extension). An array with the keys as the fields to send and the values being the associated values. See RFC 2971 [3.3] for a list of defined standard field values. DEFAULT: No info sent to server </li> <li> lang: (array) A list of languages (in priority order) to be used to display human readable messages. DEFAULT: Messages output in IMAP server default language </li> <li> log: (array) A callback to a function that receives a single parameter: a Horde_Imap_Client_Exception object. This callback function MUST be static. DEFAULT: No logging </li> <li> port: (integer) The server port to which we will connect. DEFAULT: 143 (imap or imap w/TLS) or 993 (imaps) </li> <li> secure: (string) Use SSL or TLS to connect. VALUES: <ul> <li>false</li> <li>'ssl' (Auto-detect SSL version)</li> <li>'sslv2' (Force SSL version 2)</li> <li>'sslv3' (Force SSL version 3)</li> <li>'tls'</li> </ul> DEFAULT: No encryption</li> </li> <li> statuscache: (boolean) Cache STATUS responses? DEFAULT: False </li> <li> timeout: (integer) Connection timeout, in seconds. DEFAULT: 30 seconds </li> </ul> </li> </ul>

Returns

Horde_Imap_Client_Base
The newly created instance.
Constants summary
integer OPEN_READONLY
# 1
integer OPEN_READWRITE
# 2
integer OPEN_AUTO
# 3
integer MBOX_SUBSCRIBED
# 1
integer MBOX_SUBSCRIBED_EXISTS
# 2
integer MBOX_UNSUBSCRIBED
# 3
integer MBOX_ALL
# 4
integer STATUS_MESSAGES
# 1
integer STATUS_RECENT
# 2
integer STATUS_UIDNEXT
# 4
integer STATUS_UIDVALIDITY
# 8
integer STATUS_UNSEEN
# 16
integer STATUS_ALL
# 32
integer STATUS_FIRSTUNSEEN
# 64
integer STATUS_FLAGS
# 128
integer STATUS_PERMFLAGS
# 256
integer STATUS_HIGHESTMODSEQ
# 512
integer STATUS_LASTMODSEQ
# 1024
integer STATUS_LASTMODSEQUIDS
# 2048
integer STATUS_UIDNOTSTICKY
# 4096
integer SORT_ARRIVAL
# 1
integer SORT_CC
# 2
integer SORT_DATE
# 3
integer SORT_FROM
# 4
integer SORT_REVERSE
# 5
integer SORT_SIZE
# 6
integer SORT_SUBJECT
# 7
integer SORT_TO
# 8
integer SORT_THREAD
# 9
integer SORT_DISPLAYFROM
# 10
integer SORT_DISPLAYTO
# 11
integer SORT_SEQUENCE
# 12
integer SORT_RELEVANCY
# 13
integer SEARCH_RESULTS_COUNT
# 1
integer SEARCH_RESULTS_MATCH
# 2
integer SEARCH_RESULTS_MAX
# 3
integer SEARCH_RESULTS_MIN
# 4
integer SEARCH_RESULTS_SAVE
# 5
integer SEARCH_RESULTS_RELEVANCY
# 6
integer SORT_RESULTS_COUNT
# 1
integer SORT_RESULTS_MATCH
# 2
integer SORT_RESULTS_MAX
# 3
integer SORT_RESULTS_MIN
# 4
integer SORT_RESULTS_SAVE
# 5
integer THREAD_ORDEREDSUBJECT
# 1
integer THREAD_REFERENCES
# 2
integer THREAD_REFS
# 3
integer FETCH_STRUCTURE
# 1
integer FETCH_FULLMSG
# 2
integer FETCH_HEADERTEXT
# 3
integer FETCH_BODYTEXT
# 4
integer FETCH_MIMEHEADER
# 5
integer FETCH_BODYPART
# 6
integer FETCH_BODYPARTSIZE
# 7
integer FETCH_HEADERS
# 8
integer FETCH_ENVELOPE
# 9
integer FETCH_FLAGS
# 10
integer FETCH_IMAPDATE
# 11
integer FETCH_SIZE
# 12
integer FETCH_UID
# 13
integer FETCH_SEQ
# 14
integer FETCH_MODSEQ
# 15
integer DATA_ASTRING
# 1
integer DATA_ATOM
# 2
integer DATA_DATETIME
# 3
integer DATA_LISTMAILBOX
# 4
integer DATA_MAILBOX
# 5
integer DATA_NSTRING
# 6
integer DATA_NUMBER
# 7
integer DATA_STRING
# 8
integer NS_PERSONAL
# 1
integer NS_OTHER
# 2
integer NS_SHARED
# 3
string ACL_LOOKUP
# 'l'
string ACL_READ
# 'r'
string ACL_SEEN
# 's'
string ACL_WRITE
# 'w'
string ACL_INSERT
# 'i'
string ACL_POST
# 'p'
string ACL_CREATEMBOX
# 'k'
string ACL_DELETEMBOX
# 'x'
string ACL_DELETEMSGS
# 't'
string ACL_EXPUNGE
# 'e'
string ACL_ADMINISTER
# 'a'
string ACL_CREATE
# 'c'
string ACL_DELETE
# 'd'
string FLAG_ANSWERED
# '\\answered'
string FLAG_DELETED
# '\\deleted'
string FLAG_DRAFT
# '\\draft'
string FLAG_FLAGGED
# '\\flagged'
string FLAG_RECENT
# '\\recent'
string FLAG_SEEN
# '\\seen'
string FLAG_MDNSENT
# '$mdnsent'
string FLAG_FORWARDED
# '$forwarded'
string FLAG_JUNK
# '$junk'
string FLAG_NOTJUNK
# '$notjunk'
string SPECIALUSE_ALL
# '\\All'
string SPECIALUSE_ARCHIVE
# '\\Archive'
string SPECIALUSE_DRAFTS
# '\\Drafts'
string SPECIALUSE_FLAGGED
# '\\Flagged'
string SPECIALUSE_JUNK
# '\\Junk'
string SPECIALUSE_SENT
# '\\Sent'
string SPECIALUSE_TRASH
# '\\Trash'
integer DEBUG_RAW
# 0
integer DEBUG_CLIENT
# 1
integer DEBUG_INFO
# 2
integer DEBUG_SERVER
# 3
integer SLOW_COMMAND
# 1
Properties summary
public static array $capability_deps

Capability dependencies.

Capability dependencies.

# array( // RFC 5162 [1] 'QRESYNC' => array( // QRESYNC requires CONDSTORE, but the latter is implied and is // not required to be listed. 'ENABLE' ), // RFC 5182 [2.1] 'SEARCHRES' => array( 'ESEARCH' ), // RFC 5255 [3.1] 'LANGUAGE' => array( 'NAMESPACE' ), // RFC 5957 [1] 'SORT=DISPLAY' => array( 'SORT' ) )
API documentation generated by ApiGen