VERSION
VERSION
Serialized version.
An interface to an IMAP4rev1 server (RFC 3501) using standard PHP code.
Implements the following IMAP-related RFCs (see http://www.iana.org/assignments/imap4-capabilities):
- RFC 2086/4314: ACL - RFC 2087: QUOTA - RFC 2088: LITERAL+ - RFC 2195: AUTH=CRAM-MD5 - RFC 2221: LOGIN-REFERRALS - RFC 2342: NAMESPACE - RFC 2595/4616: TLS & AUTH=PLAIN - RFC 2831: DIGEST-MD5 authentication mechanism (obsoleted by RFC 6331) - RFC 2971: ID - RFC 3348: CHILDREN - RFC 3501: IMAP4rev1 specification - RFC 3502: MULTIAPPEND - RFC 3516: BINARY - RFC 3691: UNSELECT - RFC 4315: UIDPLUS - RFC 4422: SASL Authentication (for DIGEST-MD5) - RFC 4466: Collected extensions (updates RFCs 2088, 3501, 3502, 3516) - RFC 4469/5550: CATENATE - RFC 4731: ESEARCH - RFC 4959: SASL-IR - RFC 5032: WITHIN - RFC 5161: ENABLE - RFC 5182: SEARCHRES - RFC 5255: LANGUAGE/I18NLEVEL - RFC 5256: THREAD/SORT - RFC 5258: LIST-EXTENDED - RFC 5267: ESORT; PARTIAL search return option - RFC 5464: METADATA - RFC 5530: IMAP Response Codes - RFC 5802: AUTH=SCRAM-SHA-1 - RFC 5819: LIST-STATUS - RFC 5957: SORT=DISPLAY - RFC 6154: SPECIAL-USE/CREATE-SPECIAL-USE - RFC 6203: SEARCH=FUZZY - RFC 6851: MOVE - RFC 6855: UTF8=ACCEPT/UTF8=ONLY - RFC 6858: DOWNGRADED response code - RFC 7162: CONDSTORE/QRESYNC
Implements the following non-RFC extensions:
- draft-ietf-morg-inthread-01: THREAD=REFS - draft-daboo-imap-annotatemore-07: ANNOTATEMORE - draft-daboo-imap-annotatemore-08: ANNOTATEMORE2 - XIMAPPROXY Requires imapproxy v1.2.7-rc1 or later See https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail/trunk/imap_proxy/README - AUTH=XOAUTH2 https://developers.google.com/gmail/xoauth2_protocol
TODO (or not necessary?):
- RFC 2177: IDLE - RFC 2193: MAILBOX-REFERRALS - RFC 4467/5092/5524/5550/5593: URLAUTH, URLAUTH=BINARY, URL-PARTIAL - RFC 4978: COMPRESS=DEFLATE See: http://bugs.php.net/bug.php?id=48725 - RFC 5257: ANNOTATE (Experimental) - RFC 5259: CONVERT - RFC 5267: CONTEXT=SEARCH; CONTEXT=SORT - RFC 5465: NOTIFY - RFC 5466: FILTERS - RFC 6785: IMAPSIEVE - RFC 7377: MULTISEARCH
$statuscache : boolean
Horde_Imap_Client is optimized for short (i.e. 1 seconds) scripts. It makes heavy use of mailbox caching to save on server accesses. This property should be set to false for long-running scripts, or else status() data may not reflect the current state of the mailbox on the server.
$_alerts : \Horde_Imap_Client_Base_Alerts
Alerts reporting object.
$_cache : \Horde_Imap_Client_Cache
The Horde_Imap_Client_Cache object.
$_debug : \Horde_Imap_Client_Base_Debug
The debug object.
$_selected : \Horde_Imap_Client_Mailbox
The currently selected mailbox.
__construct(array $params = array())
Constructor.
array | $params | A hash containing configuration parameters. Additional parameters to base driver:
|
getIdsOb(mixed $ids = null, boolean $sequence = false) : \Horde_Imap_Client_Ids
Returns the correct IDs object for use with this driver.
mixed | $ids | Either self::ALL, self::SEARCH_RES, self::LARGEST, Horde_Imap_Client_Ids object, array, or sequence string. |
boolean | $sequence | Are $ids message sequence numbers? |
The IDs object.
queryCapability(string $capability) : mixed
Returns whether the IMAP server supports the given capability (See RFC 3501 [6.1.1]).
string | $capability | The capability string to query. |
True if the server supports the queried capability, false if it doesn't, or an array if the capability can contain multiple values.
capability() : array
Get CAPABILITY information from the IMAP server.
The capability array.
None found |
None found |
getNamespaces(array $additional = array(), array $opts = array()) : mixed
Get the NAMESPACE information from the IMAP server (RFC 2342).
array | $additional | If the server supports namespaces, any additional namespaces to add to the namespace list that are not broadcast by the server. The namespaces must be UTF-8 strings. |
array | $opts | Additional options:
|
A Horde_Imap_Client_Namespace_List object if 'ob_return', is true. Otherwise, an array of namespace objects (@deprecated) with the name as the key (UTF-8) and the following values:
- delimiter: (string) The namespace delimiter. - hidden: (boolean) Is this a hidden namespace? - name: (string) The namespace name (UTF-8). - translation: (string) Returns the translated name of the namespace (UTF-8). Requires RFC 5255 and a previous call to setLanguage(). - type: (integer) The namespace type. Either: - Horde_Imap_Client::NS_PERSONAL - Horde_Imap_Client::NS_OTHER - Horde_Imap_Client::NS_SHARED
None found |
isSecureConnection() : boolean
Display if connection to the server has been secured via TLS or SSL.
True if the IMAP connection is secured.
None found |
alerts() : array
Return a list of alerts that MUST be presented to the user (RFC 3501 [7.1]).
An array of alert messages.
None found |
None found |
None found |
sendID(array $info = null)
Send ID information to the IMAP server (RFC 2971).
array | $info | Overrides the value of the 'id' param and sends this information instead. |
None found |
getID() : array
Return ID information from the IMAP server (RFC 2971).
An array of information returned, with the keys as the 'field' and the values as the 'value'.
None found |
setLanguage(array $langs = null) : string
Sets the preferred language for server response messages (RFC 5255).
array | $langs | Overrides the value of the 'lang' param and sends this list of preferred languages instead. The special string 'i-default' can be used to restore the language to the server default. |
The language accepted by the server, or null if the default language is used.
None found |
getLanguage(array $list = false) : mixed
Gets the preferred language for server response messages (RFC 5255).
array | $list | If true, return the list of available languages. |
If $list is true, the list of languages available on the server (may be empty). If false, the language used by the server, or null if the default language is used.
None found |
openMailbox(mixed $mailbox, integer $mode = \Horde_Imap_Client::OPEN_AUTO)
Open a mailbox.
mixed | $mailbox | The mailbox to open. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
integer | $mode | The access mode. Either
|
None found |
currentMailbox() : mixed
Return the currently opened mailbox and access mode.
Null if no mailbox selected, or an array with two elements:
None found |
createMailbox(mixed $mailbox, array $opts = array())
Create a mailbox.
mixed | $mailbox | The mailbox to create. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
array | $opts | Additional options:
|
None found |
deleteMailbox(mixed $mailbox)
Delete a mailbox.
mixed | $mailbox | The mailbox to delete. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
None found |
renameMailbox(mixed $old, mixed $new)
Rename a mailbox.
mixed | $old | The old mailbox name. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
mixed | $new | The new mailbox name. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
None found |
subscribeMailbox(mixed $mailbox, boolean $subscribe = true)
Manage subscription status for a mailbox.
mixed | $mailbox | The mailbox to [un]subscribe to. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
boolean | $subscribe | True to subscribe, false to unsubscribe. |
None found |
listMailboxes(mixed $pattern, integer $mode = \Horde_Imap_Client::MBOX_ALL, array $options = array()) : array
Obtain a list of mailboxes matching a pattern.
mixed | $pattern | The mailbox search pattern(s) (see RFC 3501 [6.3.8] for the format). A UTF-8 string or an array of strings. If a Horde_Imap_Client_Mailbox object is given, it is escaped (i.e. wildcard patterns are converted to return the miminal number of matches possible). |
integer | $mode | Which mailboxes to return. Either:
|
array | $options | Additional options: - attributes: (boolean) If true, return attribute information under the 'attributes' key. DEFAULT: Do not return this information. - children: (boolean) Tell server to return children attribute information (\HasChildren, \HasNoChildren). Requires the LIST-EXTENDED extension to guarantee this information is returned. Server MAY return this attribute without this option, or if the CHILDREN extension is available, but it is not guaranteed. DEFAULT: false - flat: (boolean) If true, return a flat list of mailbox names only. Overrides the 'attributes' option. DEFAULT: Do not return flat list. - recursivematch: (boolean) Force the server to return information about parent mailboxes that don't match other selection options, but have some sub-mailboxes that do. Information about children is returned in the CHILDINFO extended data item ('extended'). Requires the LIST-EXTENDED extension. DEFAULT: false - remote: (boolean) Tell server to return mailboxes that reside on another server. Requires the LIST-EXTENDED extension. DEFAULT: false - special_use: (boolean) Tell server to return special-use attribute information (see Horde_Imap_Client SPECIALUSE_* constants). Server must support the SPECIAL-USE return option for this setting to have any effect. DEFAULT: false - status: (integer) Tell server to return status information. The value is a bitmask that may contain any of: - Horde_Imap_Client::STATUS_MESSAGES - Horde_Imap_Client::STATUS_RECENT - Horde_Imap_Client::STATUS_UIDNEXT - Horde_Imap_Client::STATUS_UIDVALIDITY - Horde_Imap_Client::STATUS_UNSEEN - Horde_Imap_Client::STATUS_HIGHESTMODSEQ DEFAULT: 0 - sort: (boolean) If true, return a sorted list of mailboxes? DEFAULT: Do not sort the list. - sort_delimiter: (string) If 'sort' is true, this is the delimiter used to sort the mailboxes. DEFAULT: '.' |
If 'flat' option is true, the array values are a list of Horde_Imap_Client_Mailbox objects. Otherwise, the keys are UTF-8 mailbox names and the values are arrays with these keys:
None found |
status(mixed $mailbox, integer $flags = \Horde_Imap_Client::STATUS_ALL, array $opts = array()) : array
Obtain status information for a mailbox.
mixed | $mailbox | The mailbox(es) to query. Either a Horde_Imap_Client_Mailbox object, a string (UTF-8), or an array of objects/strings (since 2.10.0). |
integer | $flags | A bitmask of information requested from the server. Allowed flags: - Horde_Imap_Client::STATUS_MESSAGES Return key: messages Return format: (integer) The number of messages in the mailbox. - Horde_Imap_Client::STATUS_RECENT Return key: recent Return format: (integer) The number of messages with the \Recent flag set as currently reported in the mailbox - Horde_Imap_Client::STATUS_RECENT_TOTAL Return key: recent_total Return format: (integer) The number of messages with the \Recent flag set. This returns the total number of messages that have been marked as recent in this mailbox since the PHP process began. (since 2.12.0) - Horde_Imap_Client::STATUS_UIDNEXT Return key: uidnext Return format: (integer) The next UID to be assigned in the mailbox. Only returned if the server automatically provides the data. - Horde_Imap_Client::STATUS_UIDNEXT_FORCE Return key: uidnext Return format: (integer) The next UID to be assigned in the mailbox. This option will always determine this value, even if the server does not automatically provide this data. - Horde_Imap_Client::STATUS_UIDVALIDITY Return key: uidvalidity Return format: (integer) The unique identifier validity of the mailbox. - Horde_Imap_Client::STATUS_UNSEEN Return key: unseen Return format: (integer) The number of messages which do not have the \Seen flag set. - Horde_Imap_Client::STATUS_FIRSTUNSEEN Return key: firstunseen Return format: (integer) The sequence number of the first unseen message in the mailbox. - Horde_Imap_Client::STATUS_FLAGS Return key: flags Return format: (array) The list of defined flags in the mailbox (all flags are in lowercase). - Horde_Imap_Client::STATUS_PERMFLAGS Return key: permflags Return format: (array) The list of flags that a client can change permanently (all flags are in lowercase). - Horde_Imap_Client::STATUS_HIGHESTMODSEQ Return key: highestmodseq Return format: (integer) If the server supports the CONDSTORE IMAP extension, this will be the highest mod-sequence value of all messages in the mailbox. Else 0 if CONDSTORE not available or the mailbox does not support mod-sequences. - Horde_Imap_Client::STATUS_SYNCMODSEQ Return key: syncmodseq Return format: (integer) If caching, and the server supports the CONDSTORE IMAP extension, this is the cached mod-sequence value of the mailbox when it was opened for the first time in this access. Will be null if not caching, CONDSTORE not available, or the mailbox does not support mod-sequences. - Horde_Imap_Client::STATUS_SYNCFLAGUIDS Return key: syncflaguids Return format: (Horde_Imap_Client_Ids) If caching, the server supports the CONDSTORE IMAP extension, and the mailbox contained cached data when opened for the first time in this access, this is the list of UIDs in which flags have changed since STATUS_SYNCMODSEQ. - Horde_Imap_Client::STATUS_SYNCVANISHED Return key: syncvanished Return format: (Horde_Imap_Client_Ids) If caching, the server supports the CONDSTORE IMAP extension, and the mailbox contained cached data when opened for the first time in this access, this is the list of UIDs which have been deleted since STATUS_SYNCMODSEQ. - Horde_Imap_Client::STATUS_UIDNOTSTICKY Return key: uidnotsticky Return format: (boolean) If the server supports the UIDPLUS IMAP extension, and the queried mailbox does not support persistent UIDs, this value will be true. In all other cases, this value will be false. - Horde_Imap_Client::STATUS_FORCE_REFRESH Normally, the status information will be cached for a given mailbox. Since most PHP requests are generally less than a second, this is fine. However, if your script is long running, the status information may not be up-to-date. Specifying this flag will ensure that the server is always polled for the current mailbox status before results are returned. (since 2.14.0) - Horde_Imap_Client::STATUS_ALL (DEFAULT) Shortcut to return 'messages', 'recent', 'uidnext', 'uidvalidity', and 'unseen' values. |
array | $opts | Additional options: - sort: (boolean) If true, sort the list of mailboxes? (since 2.10.0) DEFAULT: Do not sort the list. - sort_delimiter: (string) If 'sort' is true, this is the delimiter used to sort the mailboxes. (since 2.10.0) DEFAULT: '.' |
If $mailbox contains multiple mailboxes, an array with keys being the UTF-8 mailbox name and values as arrays containing the requested keys (see above). Otherwise, an array with keys as the requested keys (see above) and values as the key data.
None found |
statusMultiple(array $mailboxes, integer $flags = \Horde_Imap_Client::STATUS_ALL, array $opts = array()) : array
Perform a STATUS call on multiple mailboxes at the same time.
This method leverages the LIST-EXTENDED and LIST-STATUS extensions on the IMAP server to improve the efficiency of this operation.
array | $mailboxes | The mailboxes to query. Either Horde_Imap_Client_Mailbox objects, strings (UTF-8), or a combination of the two. |
integer | $flags | See status(). |
array | $opts | Additional options:
|
An array with the keys as the mailbox names (UTF-8) and the values as arrays with the requested keys (from the mask given in $flags).
None found |
append(mixed $mailbox, array $data, array $options = array()) : \Horde_Imap_Client_Ids
Append message(s) to a mailbox.
mixed | $mailbox | The mailbox to append the message(s) to. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
array | $data | The message data to append, along with additional options. An array of arrays with each embedded array having the following entries: - data: (mixed) The data to append. If a string or a stream resource, this will be used as the entire contents of a single message. If an array, will catenate all given parts into a single message. This array contains one or more arrays with two keys: - t: (string) Either 'url' or 'text'. - v: (mixed) If 't' is 'url', this is the IMAP URL to the message part to append. If 't' is 'text', this is either a string or resource representation of the message part data. DEFAULT: NONE (entry is MANDATORY) - flags: (array) An array of flags/keywords to set on the appended message. DEFAULT: Only the \Recent flag is set. - internaldate: (DateTime) The internaldate to set for the appended message. DEFAULT: internaldate will be the same date as when the message was appended. |
array | $options | Additonal options: - create: (boolean) Try to create $mailbox if it does not exist? DEFAULT: No. |
The UIDs of the appended messages.
None found |
check()
Request a checkpoint of the currently selected mailbox (RFC 3501 [6.4.1]).
None found |
close(array $options = array())
Close the connection to the currently selected mailbox, optionally expunging all deleted messages (RFC 3501 [6.4.2]).
array | $options | Additional options:
|
None found |
expunge(mixed $mailbox, array $options = array()) : \Horde_Imap_Client_Ids
Expunge deleted messages from the given mailbox.
mixed | $mailbox | The mailbox to expunge. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
array | $options | Additional options:
|
If 'list' option is true, returns the UID list of expunged messages.
None found |
search(mixed $mailbox, \Horde_Imap_Client_Search_Query $query = null, array $options = array()) : array
Search a mailbox.
mixed | $mailbox | The mailbox to search. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
\Horde_Imap_Client_Search_Query | $query | The search query. Defaults to an ALL search. |
array | $options | Additional options: - nocache: (boolean) Don't cache the results. DEFAULT: false (results cached, if possible) - partial: (mixed) The range of results to return (message sequence numbers) Only a single range is supported (represented by the minimum and maximum values contained in the range given). DEFAULT: All messages are returned. - results: (array) The data to return. Consists of zero or more of the following flags: - Horde_Imap_Client::SEARCH_RESULTS_COUNT - Horde_Imap_Client::SEARCH_RESULTS_MATCH (DEFAULT) - Horde_Imap_Client::SEARCH_RESULTS_MAX - Horde_Imap_Client::SEARCH_RESULTS_MIN - Horde_Imap_Client::SEARCH_RESULTS_SAVE - Horde_Imap_Client::SEARCH_RESULTS_RELEVANCY - sequence: (boolean) If true, returns an array of sequence numbers. DEFAULT: Returns an array of UIDs - sort: (array) Sort the returned list of messages. Multiple sort criteria can be specified. Any sort criteria can be sorted in reverse order (instead of the default ascending order) by adding a Horde_Imap_Client::SORT_REVERSE element to the array directly before adding the sort element. The following sort criteria are available: - Horde_Imap_Client::SORT_ARRIVAL - Horde_Imap_Client::SORT_CC - Horde_Imap_Client::SORT_DATE - Horde_Imap_Client::SORT_DISPLAYFROM On servers that don't support SORT=DISPLAY, this criteria will fallback to doing client-side sorting. - Horde_Imap_Client::SORT_DISPLAYFROM_FALLBACK On servers that don't support SORT=DISPLAY, this criteria will fallback to Horde_Imap_Client::SORT_FROM [since 2.4.0]. - Horde_Imap_Client::SORT_DISPLAYTO On servers that don't support SORT=DISPLAY, this criteria will fallback to doing client-side sorting. - Horde_Imap_Client::SORT_DISPLAYTO_FALLBACK On servers that don't support SORT=DISPLAY, this criteria will fallback to Horde_Imap_Client::SORT_TO [since 2.4.0]. - Horde_Imap_Client::SORT_FROM - Horde_Imap_Client::SORT_SEQUENCE - Horde_Imap_Client::SORT_SIZE - Horde_Imap_Client::SORT_SUBJECT - Horde_Imap_Client::SORT_TO [On servers that support SEARCH=FUZZY, this criteria is also available:] - Horde_Imap_Client::SORT_RELEVANCY |
An array with the following keys:
- count: (integer) The number of messages that match the search criteria. Always returned. - match: (Horde_Imap_Client_Ids) The IDs that match $criteria, sorted if the 'sort' modifier was set. Returned if Horde_Imap_Client::SEARCH_RESULTS_MATCH is set. - max: (integer) The UID (default) or message sequence number (if 'sequence' is true) of the highest message that satisifies $criteria. Returns null if no matches found. Returned if Horde_Imap_Client::SEARCH_RESULTS_MAX is set. - min: (integer) The UID (default) or message sequence number (if 'sequence' is true) of the lowest message that satisifies $criteria. Returns null if no matches found. Returned if Horde_Imap_Client::SEARCH_RESULTS_MIN is set. - modseq: (integer) The highest mod-sequence for all messages being returned. Returned if 'sort' is false, the search query includes a MODSEQ command, and the server supports the CONDSTORE IMAP extension. - relevancy: (array) The list of relevancy scores. Returned if Horde_Imap_Client::SEARCH_RESULTS_RELEVANCY is set and the server supports FUZZY search matching. - save: (boolean) Whether the search results were saved. Returned if Horde_Imap_Client::SEARCH_RESULTS_SAVE is set.
None found |
setComparator(string $comparator = null)
Set the comparator to use for searching/sorting (RFC 5255).
string | $comparator | The comparator string (see RFC 4790 [3.1] - "collation-id" - for format). The reserved string 'default' can be used to select the default comparator. |
None found |
getComparator() : mixed
Get the comparator used for searching/sorting (RFC 5255).
Null if the default comparator is being used, or an array of comparator information (see RFC 5255 [4.8]).
None found |
thread(mixed $mailbox, array $options = array()) : \Horde_Imap_Client_Data_Thread
Thread sort a given list of messages (RFC 5256).
mixed | $mailbox | The mailbox to query. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
array | $options | Additional options: - criteria: (mixed) The following thread criteria are available: - Horde_Imap_Client::THREAD_ORDEREDSUBJECT - Horde_Imap_Client::THREAD_REFERENCES - Horde_Imap_Client::THREAD_REFS Other algorithms can be explicitly specified by passing the IMAP thread algorithm in as a string value. DEFAULT: Horde_Imap_Client::THREAD_ORDEREDSUBJECT - search: (Horde_Imap_Client_Search_Query) The search query. DEFAULT: All messages in mailbox included in thread sort. - sequence: (boolean) If true, each message is stored and referred to by its message sequence number. DEFAULT: Stored/referred to by UID. |
A thread data object.
None found |
fetch(mixed $mailbox, \Horde_Imap_Client_Fetch_Query $query, array $options = array()) : \Horde_Imap_Client_Fetch_Results
Fetch message data (see RFC 3501 [6.4.5]).
mixed | $mailbox | The mailbox to search. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
\Horde_Imap_Client_Fetch_Query | $query | Fetch query object. |
array | $options | Additional options:
|
A results object.
None found |
vanished(mixed $mailbox, integer $modseq, array $opts = array()) : \Horde_Imap_Client_Ids
Get the list of vanished messages (UIDs that have been expunged since a given mod-sequence value).
mixed | $mailbox | The mailbox to query. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
integer | $modseq | Search for expunged messages after this mod-sequence value. |
array | $opts | Additional options:
|
List of UIDs that have vanished.
None found |
store(mixed $mailbox, array $options = array()) : \Horde_Imap_Client_Ids
Store message flag data (see RFC 3501 [6.4.6]).
mixed | $mailbox | The mailbox containing the messages to modify. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
array | $options | Additional options:
|
A Horde_Imap_Client_Ids object containing the list of IDs that failed the 'unchangedsince' test.
None found |
copy(mixed $source, mixed $dest, array $options = array()) : mixed
Copy messages to another mailbox.
mixed | $source | The source mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
mixed | $dest | The destination mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
array | $options | Additional options:
|
An array mapping old UIDs (keys) to new UIDs (values) on success (only guaranteed if 'force_map' is true) or true.
None found |
setQuota(mixed $root, array $resources = array())
Set quota limits. The server must support the IMAP QUOTA extension (RFC 2087).
mixed | $root | The quota root. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
array | $resources | The resource values to set. Keys are the resource atom name; value is the resource value. |
None found |
getQuota(mixed $root) : mixed
Get quota limits. The server must support the IMAP QUOTA extension (RFC 2087).
mixed | $root | The quota root. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
An array with resource keys. Each key holds an array with 2 values: 'limit' and 'usage'.
None found |
getQuotaRoot(mixed $mailbox) : mixed
Get quota limits for a mailbox. The server must support the IMAP QUOTA extension (RFC 2087).
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
An array with the keys being the quota roots. Each key holds an array with resource keys: each of these keys holds an array with 2 values: 'limit' and 'usage'.
None found |
getACL(mixed $mailbox) : array
Get the ACL rights for a given mailbox. The server must support the IMAP ACL extension (RFC 2086/4314).
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
An array with identifiers as the keys and Horde_Imap_Client_Data_Acl objects as the values.
None found |
setACL(mixed $mailbox, string $identifier, array $options)
Set ACL rights for a given mailbox/identifier.
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
string | $identifier | The identifier to alter (UTF-8). |
array | $options | Additional options:
|
None found |
deleteACL(mixed $mailbox, string $identifier)
Deletes ACL rights for a given mailbox/identifier.
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
string | $identifier | The identifier to delete (UTF-8). |
None found |
listACLRights(mixed $mailbox, string $identifier) : \Horde_Imap_Client_Data_AclRights
List the ACL rights for a given mailbox/identifier. The server must support the IMAP ACL extension (RFC 2086/4314).
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
string | $identifier | The identifier to query (UTF-8). |
An ACL data rights object.
None found |
getMyACLRights(mixed $mailbox) : \Horde_Imap_Client_Data_Acl
Get the ACL rights for the current user for a given mailbox. The server must support the IMAP ACL extension (RFC 2086/4314).
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
An ACL data object.
None found |
allAclRights() : array
Return master list of ACL rights available on the server.
A list of ACL rights.
None found |
getMetadata(mixed $mailbox, array $entries, array $options = array()) : array
Get metadata for a given mailbox. The server must support either the IMAP METADATA extension (RFC 5464) or the ANNOTATEMORE extension (http://ietfreport.isoc.org/idref/draft-daboo-imap-annotatemore/).
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
array | $entries | The entries to fetch (UTF-8 strings). |
array | $options | Additional options:
|
An array with metadata names as the keys and metadata values as the values. If 'maxsize' is set, and entries exist on the server larger than this size, the size will be returned in the key '*longentries'.
None found |
setMetadata(mixed $mailbox, array $data)
Set metadata for a given mailbox/identifier.
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). If empty, sets a server annotation. |
array | $data | A set of data values. The metadata values corresponding to the keys of the array will be set to the values in the array. |
None found |
getCacheId(mixed $mailbox, array $addl = array()) : string
Returns a unique identifier for the current mailbox status.
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
array | $addl | Additional cache info to add to the cache ID string. |
The cache ID string, which will change when the composition of the mailbox changes. The uidvalidity will always be the first element, and will be delimited by the '|' character.
None found |
parseCacheId(string $id) : array
Parses a cacheID created by getCacheId().
string | $id | The cache ID. |
An array with the following information:
None found |
resolveIds(\Horde_Imap_Client_Mailbox $mailbox, \Horde_Imap_Client_Ids $ids, integer $convert) : \Horde_Imap_Client_Ids
Resolves an IDs object into a list of IDs.
\Horde_Imap_Client_Mailbox | $mailbox | The mailbox. |
\Horde_Imap_Client_Ids | $ids | The Ids object. |
integer | $convert | Convert to UIDs?
|
The list of IDs.
None found |
validSearchCharset(string $charset) : boolean
Determines if the given charset is valid for search-related queries.
This check pertains just to the basic IMAP SEARCH command.
string | $charset | The query charset. |
True if server supports this charset.
None found |
getSyncToken(mixed $mailbox) : string
Returns a unique token for the current mailbox synchronization status.
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
The sync token.
since | 2.2.0 |
---|
sync(mixed $mailbox, string $token, array $opts = array()) : \Horde_Imap_Client_Data_Sync
Synchronize a mailbox from a sync token.
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
string | $token | A sync token generated by getSyncToken(). |
array | $opts | Additional options:
|
A sync object.
since | 2.2.0 |
---|
None found |
None found |
_initCache(boolean $current = false) : boolean
Initialize the Horde_Imap_Client_Cache object, if necessary.
boolean | $current | If true, we are going to update the currently selected mailbox. Add an additional check to see if caching is available in current mailbox. |
Returns true if caching is enabled.
None found |
_capability() : mixed
Query server capability.
Required because internal code can't call capability via magic method directly - it may not exist yet, the creation code may call capability recursively, and __get() doesn't allow recursive calls to the same property (chicken/egg issue).
The capability object if no arguments provided. If arguments are provided, they are passed to the query() method and this value is returned.
None found |
None found |
_getNamespaces() : \Horde_Imap_Client_Namespace_List
Get the NAMESPACE information from the IMAP server.
Namespace list object.
None found |
None found |
_login() : boolean
Login to the IMAP server.
Return true if global login tasks should be run.
None found |
_sendID(array $info)
Send ID information to the IMAP server (RFC 2971).
array | $info | The information to send to the server. |
None found |
_getID() : array
Return ID information from the IMAP server (RFC 2971).
An array of information returned, with the keys as the 'field' and the values as the 'value'.
None found |
_setLanguage(array $langs) : string
Sets the preferred language for server response messages (RFC 5255).
array | $langs | The preferred list of languages. |
The language accepted by the server, or null if the default language is used.
None found |
_getLanguage(array $list) : mixed
Gets the preferred language for server response messages (RFC 5255).
array | $list | If true, return the list of available languages. |
If $list is true, the list of languages available on the server (may be empty). If false, the language used by the server, or null if the default language is used.
None found |
_openMailbox(\Horde_Imap_Client_Mailbox $mailbox, integer $mode)
Open a mailbox.
\Horde_Imap_Client_Mailbox | $mailbox | The mailbox to open. |
integer | $mode | The access mode. |
None found |
_changeSelected(mixed $mailbox = null, integer $mode = null)
Called when the selected mailbox is changed.
mixed | $mailbox | The selected mailbox or null. |
integer | $mode | The access mode. |
None found |
_mailboxOb(string $mailbox = null) : \Horde_Imap_Client_Base_Mailbox
Return the Horde_Imap_Client_Base_Mailbox object.
string | $mailbox | The mailbox name. Defaults to currently selected mailbox. |
Mailbox object.
None found |
_createMailbox(\Horde_Imap_Client_Mailbox $mailbox, array $opts)
Create a mailbox.
\Horde_Imap_Client_Mailbox | $mailbox | The mailbox to create. |
array | $opts | Additional options. See createMailbox(). |
None found |
_deleteMailbox(\Horde_Imap_Client_Mailbox $mailbox)
Delete a mailbox.
\Horde_Imap_Client_Mailbox | $mailbox | The mailbox to delete. |
None found |
_deleteMailboxPost(\Horde_Imap_Client_Mailbox $mailbox)
Actions to perform after a mailbox delete.
\Horde_Imap_Client_Mailbox | $mailbox | The deleted mailbox. |
None found |
_renameMailbox(\Horde_Imap_Client_Mailbox $old, \Horde_Imap_Client_Mailbox $new)
Rename a mailbox.
\Horde_Imap_Client_Mailbox | $old | The old mailbox name. |
\Horde_Imap_Client_Mailbox | $new | The new mailbox name. |
None found |
_subscribeMailbox(\Horde_Imap_Client_Mailbox $mailbox, boolean $subscribe)
Manage subscription status for a mailbox.
\Horde_Imap_Client_Mailbox | $mailbox | The mailbox to [un]subscribe to. |
boolean | $subscribe | True to subscribe, false to unsubscribe. |
None found |
_listMailboxes(array $pattern, integer $mode, array $options) : array
Obtain a list of mailboxes matching a pattern.
array | $pattern | The mailbox search patterns (Horde_Imap_Client_Mailbox objects). |
integer | $mode | Which mailboxes to return. |
array | $options | Additional options. |
See listMailboxes().
None found |
_status(array $mboxes, integer $flags) : array
Obtain status information for mailboxes.
array | $mboxes | The list of mailbox objects to query. |
integer | $flags | A bitmask of information requested from the server. |
See array return for status().
None found |
_append(\Horde_Imap_Client_Mailbox $mailbox, array $data, array $options) : mixed
Append message(s) to a mailbox.
\Horde_Imap_Client_Mailbox | $mailbox | The mailbox to append the message(s) to. |
array | $data | The message data. |
array | $options | Additional options. |
A Horde_Imap_Client_Ids object containing the UIDs of the appended messages (if server supports UIDPLUS extension) or true.
None found |
_close(array $options)
Close the connection to the currently selected mailbox, optionally expunging all deleted messages (RFC 3501 [6.4.2]).
array | $options | Additional options. |
None found |
_expunge(array $options) : \Horde_Imap_Client_Ids
Expunge all deleted messages from the given mailbox.
array | $options | Additional options. |
If 'list' option is true, returns the list of expunged messages.
None found |
_search(object $query, array $options) : \Horde_Imap_Client_Ids
Search a mailbox. This driver supports all IMAP4rev1 search criteria as defined in RFC 3501.
object | $query | The search query. |
array | $options | Additional options. The '_query' key contains the value of $query->build(). |
An array of IDs.
None found |
_setComparator(string $comparator)
Set the comparator to use for searching/sorting (RFC 5255).
string | $comparator | The comparator string (see RFC 4790 [3.1] - "collation-id" - for format). The reserved string 'default' can be used to select the default comparator. |
None found |
_getComparator() : mixed
Get the comparator used for searching/sorting (RFC 5255).
Null if the default comparator is being used, or an array of comparator information (see RFC 5255 [4.8]).
None found |
_thread(array $options) : \Horde_Imap_Client_Data_Thread
Thread sort a given list of messages (RFC 5256).
array | $options | Additional options. See thread(). |
A thread data object.
None found |
_fetch(\Horde_Imap_Client_Fetch_Results $results, array $queries)
Fetch message data.
Fetch queries should be grouped in the $queries argument. Each value is an array of fetch options, with the fetch query stored in the '_query' parameter. IMPORTANT: All queries must have the same ID type (either sequence or UID).
\Horde_Imap_Client_Fetch_Results | $results | Fetch results. |
array | $queries | The list of queries. |
None found |
_vanished(integer $modseq, \Horde_Imap_Client_Ids $ids) : \Horde_Imap_Client_Ids
Get the list of vanished messages.
integer | $modseq | Mod-sequence value. |
\Horde_Imap_Client_Ids | $ids | UIDs. |
List of UIDs that have vanished.
None found |
_store(array $options) : \Horde_Imap_Client_Ids
Store message flag data.
array | $options | Additional options. |
A Horde_Imap_Client_Ids object containing the list of IDs that failed the 'unchangedsince' test.
None found |
_copy(\Horde_Imap_Client_Mailbox $dest, array $options) : mixed
Copy messages to another mailbox.
\Horde_Imap_Client_Mailbox | $dest | The destination mailbox. |
array | $options | Additional options. |
An array mapping old UIDs (keys) to new UIDs (values) on success (if the IMAP server and/or driver support the UIDPLUS extension) or true.
None found |
_setQuota(\Horde_Imap_Client_Mailbox $root, array $resources) : boolean
Set quota limits.
\Horde_Imap_Client_Mailbox | $root | The quota root. |
array | $resources | The resource values to set. |
True on success.
None found |
_getQuota(\Horde_Imap_Client_Mailbox $root) : mixed
Get quota limits.
\Horde_Imap_Client_Mailbox | $root | The quota root. |
An array with resource keys. Each key holds an array with 2 values: 'limit' and 'usage'.
None found |
_getQuotaRoot(\Horde_Imap_Client_Mailbox $mailbox) : mixed
Get quota limits for a mailbox.
\Horde_Imap_Client_Mailbox | $mailbox | A mailbox. |
An array with the keys being the quota roots. Each key holds an array with resource keys: each of these keys holds an array with 2 values: 'limit' and 'usage'.
None found |
_getACL(\Horde_Imap_Client_Mailbox $mailbox) : array
Get ACL rights for a given mailbox.
\Horde_Imap_Client_Mailbox | $mailbox | A mailbox. |
An array with identifiers as the keys and Horde_Imap_Client_Data_Acl objects as the values.
None found |
_setACL(\Horde_Imap_Client_Mailbox $mailbox, string $identifier, array $options)
Set ACL rights for a given mailbox/identifier.
\Horde_Imap_Client_Mailbox | $mailbox | A mailbox. |
string | $identifier | The identifier to alter (UTF7-IMAP). |
array | $options | Additional options. 'rights' contains the string of rights to set on the server. |
None found |
_deleteACL(\Horde_Imap_Client_Mailbox $mailbox, string $identifier)
Deletes ACL rights for a given mailbox/identifier.
\Horde_Imap_Client_Mailbox | $mailbox | A mailbox. |
string | $identifier | The identifier to delete (UTF7-IMAP). |
None found |
_listACLRights(\Horde_Imap_Client_Mailbox $mailbox, string $identifier) : \Horde_Imap_Client_Data_AclRights
Get ACL rights for a given mailbox/identifier.
\Horde_Imap_Client_Mailbox | $mailbox | A mailbox. |
string | $identifier | The identifier to query (UTF7-IMAP). |
An ACL data rights object.
None found |
_getMyACLRights(\Horde_Imap_Client_Mailbox $mailbox) : \Horde_Imap_Client_Data_Acl
Get the ACL rights for the current user for a given mailbox.
\Horde_Imap_Client_Mailbox | $mailbox | A mailbox. |
An ACL data object.
None found |
_getMetadata(\Horde_Imap_Client_Mailbox $mailbox, array $entries, array $options) : array
Get metadata for a given mailbox.
\Horde_Imap_Client_Mailbox | $mailbox | A mailbox. |
array | $entries | The entries to fetch (UTF7-IMAP strings). |
array | $options | Additional options. |
An array with metadata names as the keys and metadata values as the values.
None found |
_setMetadata(\Horde_Imap_Client_Mailbox $mailbox, array $data)
Set metadata for a given mailbox/identifier.
\Horde_Imap_Client_Mailbox | $mailbox | A mailbox. |
array | $data | A set of data values. See setMetadata() for format. |
None found |
_updateCache(\Horde_Imap_Client_Fetch_Results $data)
Store FETCH data in cache.
\Horde_Imap_Client_Fetch_Results | $data | The fetch results. |
None found |
_moveCache(\Horde_Imap_Client_Mailbox $to, array $map, string $uidvalid)
Moves cache entries from the current mailbox to another mailbox.
\Horde_Imap_Client_Mailbox | $to | The destination mailbox. |
array | $map | Mapping of source UIDs (keys) to destination UIDs (values). |
string | $uidvalid | UIDVALIDITY of destination mailbox. |
None found |
_deleteMsgs(\Horde_Imap_Client_Mailbox $mailbox, \Horde_Imap_Client_Ids $ids, array $opts = array()) : \Horde_Imap_Client_Ids
Delete messages in the cache.
\Horde_Imap_Client_Mailbox | $mailbox | The mailbox. |
\Horde_Imap_Client_Ids | $ids | The list of IDs to delete in $mailbox. |
array | $opts | Options:
|
UIDs that were deleted.
None found |
_getSearchCache(string $type, array $options) : mixed
Retrieve data from the search cache.
string | $type | The cache type ('search' or 'thread'). |
array | $options | The options array of the calling function. |
Returns search cache metadata. If search was retrieved, data is in key 'data'. Returns null if caching is not available.
None found |
_setSearchCache(mixed $data, string $sdata)
Set data in the search cache.
mixed | $data | The cache data to store. |
string | $sdata | The search data returned from _getSearchCache(). |
None found |
_updateModSeq(integer $modseq) : mixed
Updates the cached MODSEQ value.
integer | $modseq | MODSEQ value to store. |
The MODSEQ of the old value if it was replaced (or false if it didn't exist or is the same).
None found |
_condstoreSync()
Synchronizes the current mailbox cache with the server (using CONDSTORE or QRESYNC).
None found |
_cacheFields() : array
Provide the list of available caching fields.
The list of available caching fields (fields are in the key).
None found |
_syncStatus(mixed $mailbox) : array
Return the current mailbox synchronization status.
mixed | $mailbox | A mailbox. Either a Horde_Imap_Client_Mailbox object or a string (UTF-8). |
An array with status data. (This data is not guaranteed to have any specific format).
None found |
_getUidByMessageId(\Horde_Imap_Client_Mailbox $mailbox, string $msgid) : string
Get a message UID by the Message-ID. Returns the last message in a mailbox that matches.
\Horde_Imap_Client_Mailbox | $mailbox | The mailbox to search |
string | $msgid | Message-ID. |
UID (null if not found).
None found |
_parseCapability(\Horde_Imap_Client_Interaction_Pipeline $pipeline, array $data)
Parse a CAPABILITY Response (RFC 3501 [7.2.1]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
array | $data | An array of CAPABILITY strings. |
None found |
_parseNamespace(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse a NAMESPACE response (RFC 2342 [5] & RFC 5255 [3.4]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The NAMESPACE data. |
None found |
_tryLogin(string $method) : \Horde_Imap_Client_Interaction_Pipeline
Authenticate to the IMAP server.
string | $method | IMAP login method. |
Pipeline object.
None found |
_authInitialResponse(string $method, string $ir, string $username = null) : \Horde_Imap_Client_Interaction_Command
Create the AUTHENTICATE command for the initial client response.
string | $method | AUTHENTICATE SASL method. |
string | $ir | Initial client response. |
string | $username | If set, log a username message in debug log instead of raw data. |
A command object.
None found |
_loginTasks(boolean $firstlogin = true, array $resp = array()) : boolean
Perform login tasks.
boolean | $firstlogin | Is this the first login? |
array | $resp | The data response from the login command. May include:
|
True if global login tasks should be performed.
None found |
_parseID(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse an ID response (RFC 2971 [3.2]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_parseLanguage(\Horde_Imap_Client_Tokenize $data)
Parse a LANGUAGE response (RFC 5255 [3.3]).
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_enable(array $exts)
Enable an IMAP extension (see RFC 5161).
array | $exts | The extensions to enable. |
None found |
_parseEnabled(\Horde_Imap_Client_Tokenize $data)
Parse an ENABLED response (RFC 5161 [3.2]).
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_getMailboxList(array $pattern, integer $mode, array $options, array $subscribed = null) : array
Obtain a list of mailboxes.
array | $pattern | The mailbox search pattern(s). |
integer | $mode | Which mailboxes to return. |
array | $options | Additional options. 'no_listext' will skip using the LIST-EXTENDED capability. |
array | $subscribed | A list of subscribed mailboxes. |
See listMailboxes(().
None found |
_parseList(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse a LIST/LSUB response (RFC 3501 [7.2.2 & 7.2.3]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The server response (includes type as first token). |
None found |
_parseStatus(\Horde_Imap_Client_Tokenize $data)
Parse a STATUS response (RFC 3501 [7.2.4]).
\Horde_Imap_Client_Tokenize | $data | Token data |
None found |
_prepareStatusResponse(array $request, string $mailbox)
Prepares a status response for a mailbox.
array | $request | The status keys to return. |
string | $mailbox | The mailbox to query. |
None found |
_appendData(mixed $data, $asize) : \Horde_Imap_Client_Data_Format_String_Nonascii
Prepares append message data for insertion into the IMAP command string.
mixed | $data | Either a resource or a string. |
$asize |
The data object.
None found |
_convertCatenateUrl(string $url) : resource
Converts a CATENATE URL to stream data.
string | $url | The CATENATE URL. |
A stream containing the data.
None found |
_parseVanished(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse a VANISHED response (RFC 7162 [3.2.10]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The response data. |
None found |
_parseSearch(\Horde_Imap_Client_Interaction_Pipeline $pipeline, array $data)
Parse a SEARCH/SORT response (RFC 3501 [7.2.5]; RFC 4466 [3]; RFC 5256 [4]; RFC 5267 [3]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
array | $data | A list of IDs (message sequence numbers or UIDs). |
None found |
_parseEsearch(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse an ESEARCH response (RFC 4466 [2.6.2]) Format: (TAG "a567") UID COUNT 5 ALL 4:19,21,28
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_parseComparator(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse a COMPARATOR response (RFC 5255 [4.8])
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_parseThread(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse a THREAD response (RFC 5256 [4]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | Thread data. |
None found |
_parseThreadLevel(array $thread, \Horde_Imap_Client_Tokenize $data, integer $level)
Parse a level of a THREAD response (RFC 5256 [4]).
array | $thread | Results. |
\Horde_Imap_Client_Tokenize | $data | Thread data. |
integer | $level | The current tree level. |
None found |
_fetchCmd(\Horde_Imap_Client_Interaction_Pipeline $pipeline, array $options)
Add a FETCH command to the given pipeline.
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
array | $options | Fetch query options |
None found |
_partialAtom(array $opts) : string
Add a partial atom to an IMAP command based on the criteria options.
array | $opts | Criteria options. |
The partial atom.
None found |
_parseFetch(\Horde_Imap_Client_Interaction_Pipeline $pipeline, integer $id, \Horde_Imap_Client_Tokenize $data)
Parse a FETCH response (RFC 3501 [7.4.2]). A FETCH response may occur due to a FETCH command, or due to a change in a message's state (i.e.
the flags change).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
integer | $id | The message sequence number. |
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_parseBodystructure(\Horde_Imap_Client_Tokenize $data) : \Horde_Mime_Part
Recursively parse BODYSTRUCTURE data from a FETCH return (see RFC 3501 [7.4.2]).
\Horde_Imap_Client_Tokenize | $data | Data returned from the server. |
Mime part object.
None found |
_parseStructureParams(mixed $data) : array
Helper function to parse a parameters-like tokenized array.
mixed | $data | Message data. Either a Horde_Imap_Client_Tokenize object or null. |
The parameter array.
None found |
_parseEnvelope(\Horde_Imap_Client_Tokenize $data) : \Horde_Imap_Client_Data_Envelope
Parse ENVELOPE data from a FETCH return (see RFC 3501 [7.4.2]).
\Horde_Imap_Client_Tokenize | $data | Data returned from the server. |
An envelope object.
None found |
_storeCmd(array $options) : \Horde_Imap_Client_Interaction_Pipeline
Create a store command.
array | $options | See Horde_Imap_Client_Base#_store(). |
Pipeline object.
None found |
_parseQuota(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse a QUOTA response (RFC 2087 [5.1]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_parseACL(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse an ACL response (RFC 4314 [3.6]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_parseListRights(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse a LISTRIGHTS response (RFC 4314 [3.7]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_parseMyRights(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse a MYRIGHTS response (RFC 4314 [3.8]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_getAnnotateMoreEntry(string $name) : array
Split a name for the METADATA extension into the correct syntax for the older ANNOTATEMORE version.
string | $name | A name for a metadata entry. |
A list of two elements: The entry name and the value type.
None found |
_parseAnnotation(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse an ANNOTATION response (ANNOTATEMORE/ANNOTATEMORE2).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_parseMetadata(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Tokenize $data)
Parse a METADATA response (RFC 5464 [4.4]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Tokenize | $data | The server response. |
None found |
_getMboxFormatOb(string $mailbox, boolean $list = false) : \Horde_Imap_Client_Data_Format_Mailbox
Return the proper mailbox format object based on the server's capabilities.
string | $mailbox | The mailbox. |
boolean | $list | Is this object used in a LIST command? |
A mailbox format object.
None found |
_sendCmd(mixed $cmd) : \Horde_Imap_Client_Interaction_Pipeline
Sends command(s) to the IMAP server. A connection to the server must have already been made.
mixed | $cmd | Either a Command object or a Pipeline object. |
A pipeline object.
None found |
_sendCmdChunk(\Horde_Imap_Client_Interaction_Pipeline $pipeline, array $chunk)
Send a chunk of commands and/or continuation fragments to the server.
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | The pipeline object. |
array | $chunk | List of commands to send. |
None found |
_processCmd(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Interaction_Command $cmd, \Horde_Imap_Client_Data_Format_List $data) : boolean
Process/send a command to the remote server.
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | The pipeline object. |
\Horde_Imap_Client_Interaction_Command | $cmd | The master command. |
\Horde_Imap_Client_Data_Format_List | $data | Commands to send. |
True if EOL needed to finish command.
None found |
_processCmdContinuation(\Horde_Imap_Client_Interaction_Pipeline $pipeline, boolean $noexception = false) : mixed
Process a command continuation response.
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | The pipeline object. |
boolean | $noexception | Don't throw exception if continuation does not occur. |
A Horde_Imap_Client_Interaction_Server_Continuation object or false.
None found |
_command(string $cmd) : \Horde_Imap_Client_Interaction_Command
Shortcut to creating a new IMAP client command object.
string | $cmd | The IMAP command. |
A command object.
None found |
_pipeline(\Horde_Imap_Client_Interaction_Command $cmd = null) : \Horde_Imap_Client_Interaction_Pipeline
Shortcut to creating a new pipeline object.
\Horde_Imap_Client_Interaction_Command | $cmd | An IMAP command to add. |
A pipeline object.
None found |
_getLine(\Horde_Imap_Client_Interaction_Pipeline $pipeline) : \Horde_Imap_Client_Interaction_Server
Gets data from the IMAP server stream and parses it.
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
Server object.
None found |
_serverResponse(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Interaction_Server $ob)
Handle untagged server responses (see RFC 3501 [2.2.2]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Interaction_Server | $ob | Server response. |
None found |
_responseCode(\Horde_Imap_Client_Interaction_Pipeline $pipeline, \Horde_Imap_Client_Interaction_Server $ob)
Handle status responses (see RFC 3501 [7.1]).
\Horde_Imap_Client_Interaction_Pipeline | $pipeline | Pipeline object. |
\Horde_Imap_Client_Interaction_Server | $ob | Server object. |
None found |