Class rcube_imap_generic

Description

PHP based wrapper class to connect to an IMAP server

Located in /lib/Roundcube/rcube_imap_generic.php (line 32)


	
			
Class Constant Summary
Variable Summary
 mixed $data
 mixed $error
 mixed $errornum
 mixed $flags
 mixed $result
 mixed $resultcode
 mixed $selected
Method Summary
 static string compressMessageSet (array $messages, [bool $force = false])
 static string escape (string $string, [boolean $force_quotes = false])
 static void getStructurePartArray ( $a,  $part)
 static array getStructurePartData (array $structure, string $part)
 static void r_implode ( $element)
 static int strToTime (string $date)
 static mixed tokenizeResponse (string &$str, [int $num = 0])
 static array uncompressMessageSet (string $messages)
 string|bool append (string $mailbox,  &$message, [array $flags = array()], [string $date = null], [bool $binary = false], string $message)
 string|bool appendFromFile (string $mailbox, string $path, [string $headers = null], [array $flags = array()], [string $date = null], [bool $binary = false])
 resource authenticate (string $user, string $pass, [string $type = 'PLAIN'])
 void clearCapability ()
 boolean clearFolder (string $mailbox)
 boolean close ()
 void closeConnection ()
 rcube_imap_generic __construct ()
 bool connect (string $host, string $user, string $password, [array $options = null])
 bool connected ()
 bool copy (string|array $messages, string $from, string $to)
 int countMessages (string $mailbox, [ $refresh = false])
 int countRecent (string $mailbox)
 int countUnseen (string $mailbox)
 bool createFolder (string $mailbox)
 boolean deleteACL (string $mailbox, string $user)
 boolean deleteAnnotation (string $mailbox, array $data)
 boolean deleteFolder (string $mailbox)
 boolean deleteMetadata (string $mailbox, array $entries)
 array|bool enable (mixed $extension)
 mixed execute (string $command, [array $arguments = array()], [int $options = 0])
 boolean expunge (string $mailbox, [string|array $messages = NULL])
 array fetch (string $mailbox, mixed $message_set, [bool $is_uid = false], [array $query_items = array()], [string $mod_seq = null], [bool $vanished = false])
 bool|rcube_message_header fetchHeader (string $mailbox, int $id, [bool $is_uid = false], [bool $bodystr = false], [array $add_headers = array()])
 void fetchHeaderIndex ( $mailbox,  $message_set, [ $index_field = ''], [ $skip_deleted = true], [ $uidfetch = false], [ $return_uid = false])
 bool|array fetchHeaders (string $mailbox, mixed $message_set, [bool $is_uid = false], [bool $bodystr = false], [array $add_headers = array()])
 void fetchMIMEHeaders ( $mailbox,  $uid,  $parts, [ $mime = true])
 void fetchPartHeader ( $mailbox,  $id, [ $is_uid = false], [ $part = NULL])
 bool flag (string $mailbox, string|array $messages, string $flag)
 array getACL (string $mailbox)
 array getAnnotation (string $mailbox, array $entries, array $attribs)
 mixed getCapability (string $name)
 array getMetadata (string $mailbox, array $entries, [array $options = array()])
 array getNamespace ()
 array getQuota ()
 array/bool getStructure (string $mailbox, int $id, [bool $is_uid = false])
 void handlePartBody ( $mailbox,  $id, [ $is_uid = false], [ $part = ''], [ $encoding = NULL], [ $print = NULL], [ $file = NULL], [ $formatted = false], [ $max_bytes = 0])
 array id ([array $items = array()])
 int ID2UID (string $mailbox,  $id, int $uid)
 rcube_result_index index (string $mailbox, string|array $message_set, [string $index_field = ''], [bool $skip_deleted = true], [bool $uidfetch = false], [bool $return_uid = false])
 array listMailboxes (string $ref, string $mailbox, [array $status_opts = array()], [array $select_opts = array()])
 array listRights (string $mailbox, string $user)
 array listSubscribed (string $ref, string $mailbox, [array $status_opts = array()])
 resource login (string $user,  $password, string $pass)
 bool move (string|array $messages, string $from, string $to)
 string multLine (string $line, [bool $escape = false])
 array myRights (string $mailbox)
 string nextTag ()
 int parseResult (string $string, [string $err_prefix = ''])
 void putLine (string $string, [bool $endln = true], int 2)
 int|bool putLineC (string $string, [bool $endln = true])
 string readBytes (int $bytes)
 string readLine ([int $size = 1024])
 string readReply ([ &$untagged = null], array $untagged)
 bool renameFolder ( $from,  $to, string $mailbox)
 rcube_result_index search (string $mailbox, string $criteria, [bool $return_uid = false], [array $items = array()])
 boolean select (string $mailbox, [array $qresync_data = null])
 boolean setACL (string $mailbox, string $user, mixed $acl)
 boolean setAnnotation (string $mailbox, array $data)
 void setDebug (boolean $debug, [ $handler = null])
 void setError ( $code, [ $msg = ''])
 boolean setMetadata (string $mailbox, array $entries)
 rcube_result_index sort (string $mailbox, string $field, [string $add = ''], [bool $return_uid = false], [string $encoding = 'US-ASCII'])
 void sortHeaders ( $a,  $field,  $flag)
 bool startsWith (string $string, string $match, [bool $error = false], [bool $nonempty = false])
 array status (string $mailbox, [array $items = array()])
 boolean subscribe (string $mailbox)
 rcube_result_thread thread (string $mailbox, [string $algorithm = 'REFERENCES'], [string $criteria = ''], [bool $return_uid = false], [string $encoding = 'US-ASCII'])
 int UID2ID (string $mailbox, int $uid)
 bool unflag (string $mailbox, string|array $messages, string $flag)
 boolean unsubscribe (string $mailbox)
Variables
mixed $data = array() (line 39)
  • access: public
mixed $error (line 34)
  • access: public
mixed $errornum (line 35)
  • access: public
mixed $flags = array(
'SEEN' => '\\Seen',
'DELETED' => '\\Deleted',
'ANSWERED' => '\\Answered',
'DRAFT' => '\\Draft',
'FLAGGED' => '\\Flagged',
'FORWARDED' => '$Forwarded',
'MDNSENT' => '$MDNSent',
'*' => '\\*',
)
(line 40)
  • access: public
mixed $result (line 36)
  • access: public
mixed $resultcode (line 37)
  • access: public
mixed $selected (line 38)
  • access: public
Methods
static compressMessageSet (line 3562)

Converts message identifiers array into sequence-set syntax

  • return: Compressed sequence-set
string compressMessageSet (array $messages, [bool $force = false])
  • array $messages: Message identifiers
  • bool $force: Forces compression of any size
static escape (line 3735)

Escapes a string when it contains special characters (RFC3501)

  • return: String atom, quoted-string or string literal
  • todo: lists
string escape (string $string, [boolean $force_quotes = false])
  • string $string: IMAP string
  • boolean $force_quotes: Forces string quoting (for atoms)
static getStructurePartArray (line 3349)
void getStructurePartArray ( $a,  $part)
  • $a
  • $part
static getStructurePartData (line 3313)

Returns data of a message part according to specified structure.

  • return: Part data as hash array (type, encoding, charset, size)
array getStructurePartData (array $structure, string $part)
  • array $structure: Message structure (getStructure() result)
  • string $part: Message part identifier
static r_implode (line 3537)
void r_implode ( $element)
  • $element
static strToTime (line 3677)

Converts datetime string into unix timestamp

  • return: Unix timestamp
int strToTime (string $date)
  • string $date: Date string
static tokenizeResponse (line 3461)

Splits IMAP response into string tokens

  • return: Tokens array or string if $num=1
  • since: 0.5-beta
mixed tokenizeResponse (string &$str, [int $num = 0])
  • string &$str: The IMAP's server response
  • int $num: Number of tokens to return
static uncompressMessageSet (line 3618)

Converts message sequence-set into array

  • return: List of message identifiers
array uncompressMessageSet (string $messages)
  • string $messages: Message identifiers
append (line 2626)

Handler for IMAP APPEND command

  • return: On success APPENDUID response (if available) or True, False on failure
string|bool append (string $mailbox,  &$message, [array $flags = array()], [string $date = null], [bool $binary = false], string $message)
  • string $mailbox: Mailbox name
  • string $message: Message content
  • array $flags: Message flags
  • string $date: Message internal date
  • bool $binary: Enable BINARY append (RFC3516)
  • &$message
appendFromFile (line 2704)

Handler for IMAP APPEND command.

  • return: On success APPENDUID response (if available) or True, False on failure
string|bool appendFromFile (string $mailbox, string $path, [string $headers = null], [array $flags = array()], [string $date = null], [bool $binary = false])
  • string $mailbox: Mailbox name
  • string $path: Path to the file with message body
  • string $headers: Message headers
  • array $flags: Message flags
  • string $date: Message internal date
  • bool $binary: Enable BINARY append (RFC3516)
authenticate (line 476)

DIGEST-MD5/CRAM-MD5/PLAIN Authentication

  • return: Connection resourse on success, error code on error
resource authenticate (string $user, string $pass, [string $type = 'PLAIN'])
  • string $user
  • string $pass
  • string $type: Authentication type (PLAIN/CRAM-MD5/DIGEST-MD5)
clearCapability (line 461)
void clearCapability ()
clearFolder (line 1203)

Removes all messages in a folder

  • return: True on success, False on error
boolean clearFolder (string $mailbox)
  • string $mailbox: Mailbox name
close (line 1109)

Executes CLOSE command

  • return: True on success, False on error
  • since: 0.5
boolean close ()
closeConnection (line 907)

Closes connection with logout.

void closeConnection ()
Constructor __construct (line 78)

Object constructor

rcube_imap_generic __construct ()
connect (line 703)

Connects to IMAP server and authenticates.

  • return: True on success, False on failure
bool connect (string $host, string $user, string $password, [array $options = null])
  • string $host: Server hostname or IP
  • string $user: User name
  • string $password: Password
  • array $options: Connection and class options
connected (line 899)

Checks connection status

  • return: True if connection is active and user is logged in, False otherwise.
bool connected ()
copy (line 1965)

Copies message(s) from one folder to another

  • return: True on success, False on failure
bool copy (string|array $messages, string $from, string $to)
  • string|array $messages: Message UID(s)
  • string $from: Mailbox name
  • string $to: Destination mailbox name
countMessages (line 1365)

Returns count of all messages in a folder

  • return: Number of messages, False on error
int countMessages (string $mailbox, [ $refresh = false])
  • string $mailbox: Mailbox name
  • $refresh
countRecent (line 1397)

Returns count of messages with \Recent flag in a folder

  • return: Number of messages, False on error
int countRecent (string $mailbox)
  • string $mailbox: Mailbox name
countUnseen (line 1419)

Returns count of messages without \Seen flag in a specified folder

  • return: Number of messages, False on error
int countUnseen (string $mailbox)
  • string $mailbox: Mailbox name
createFolder (line 1158)

Folder creation (CREATE)

  • return: True on success, False on error
bool createFolder (string $mailbox)
  • string $mailbox: Mailbox name
deleteACL (line 2889)

Send the DELETEACL command (RFC4314)

  • return: True on success, False on failure
  • since: 0.5-beta
boolean deleteACL (string $mailbox, string $user)
  • string $mailbox: Mailbox name
  • string $user: User name
deleteAnnotation (line 3183)

Send the SETANNOTATION command with NIL values (draft-daboo-imap-annotatemore)

  • return: True on success, False on failure
  • since: 0.5-beta
boolean deleteAnnotation (string $mailbox, array $data)
  • string $mailbox: Mailbox name
  • array $data: Data array where each item is an array with two elements: entry name and attribute name
deleteFolder (line 1188)

Executes DELETE command

  • return: True on success, False on error
boolean deleteFolder (string $mailbox)
  • string $mailbox: Mailbox name
deleteMetadata (line 3032)

Send the SETMETADATA command with NIL values (RFC5464)

  • return: True on success, False on failure
  • since: 0.5-beta
boolean deleteMetadata (string $mailbox, array $entries)
  • string $mailbox: Mailbox name
  • array $entries: Entry names array
enable (line 1487)

Executes ENABLE command (RFC5161)

  • return: List of enabled extensions, False on error
  • since: 0.6
array|bool enable (mixed $extension)
  • mixed $extension: Extension name to enable (or array of names)
execute (line 3402)

Sends IMAP command and parses result

  • return: Response code or list of response code and data
  • since: 0.5-beta
mixed execute (string $command, [array $arguments = array()], [int $options = 0])
  • string $command: IMAP command
  • array $arguments: Command arguments
  • int $options: Execution options
expunge (line 1073)

Executes EXPUNGE command

  • return: True on success, False on error
boolean expunge (string $mailbox, [string|array $messages = NULL])
  • string $mailbox: Mailbox name
  • string|array $messages: Message UIDs to expunge
fetch (line 2054)

FETCH command (RFC3501)

  • return: List of rcube_message_header elements, False on error
  • since: 0.6
array fetch (string $mailbox, mixed $message_set, [bool $is_uid = false], [array $query_items = array()], [string $mod_seq = null], [bool $vanished = false])
  • string $mailbox: Mailbox name
  • mixed $message_set: Message(s) sequence identifier(s) or UID(s)
  • bool $is_uid: True if $message_set contains UIDs
  • array $query_items: FETCH command data items
  • string $mod_seq: Modification sequence for CHANGEDSINCE (RFC4551) query
  • bool $vanished: Enables VANISHED parameter (RFC5162) for CHANGEDSINCE query
fetchHeader (line 2312)

Returns message data (flags, headers, etc.)

  • return: Message data, False on error
bool|rcube_message_header fetchHeader (string $mailbox, int $id, [bool $is_uid = false], [bool $bodystr = false], [array $add_headers = array()])
  • string $mailbox: Mailbox name
  • int $id: Message sequence identifier or UID
  • bool $is_uid: True if $id is an UID
  • bool $bodystr: Enable to add BODYSTRUCTURE data to the result
  • array $add_headers: List of additional headers
fetchHeaderIndex (line 1702)
void fetchHeaderIndex ( $mailbox,  $message_set, [ $index_field = ''], [ $skip_deleted = true], [ $uidfetch = false], [ $return_uid = false])
  • $mailbox
  • $message_set
  • $index_field
  • $skip_deleted
  • $uidfetch
  • $return_uid
fetchHeaders (line 2279)

Returns message(s) data (flags, headers, etc.)

  • return: List of rcube_message_header elements, False on error
bool|array fetchHeaders (string $mailbox, mixed $message_set, [bool $is_uid = false], [bool $bodystr = false], [array $add_headers = array()])
  • string $mailbox: Mailbox name
  • mixed $message_set: Message(s) sequence identifier(s) or UID(s)
  • bool $is_uid: True if $message_set contains UIDs
  • bool $bodystr: Enable to add BODYSTRUCTURE data to the result
  • array $add_headers: List of additional headers
fetchMIMEHeaders (line 2387)
void fetchMIMEHeaders ( $mailbox,  $uid,  $parts, [ $mime = true])
  • $mailbox
  • $uid
  • $parts
  • $mime
fetchPartHeader (line 2439)
void fetchPartHeader ( $mailbox,  $id, [ $is_uid = false], [ $part = NULL])
  • $mailbox
  • $id
  • $is_uid
  • $part
flag (line 1901)

Sets flag of the message(s)

  • return: True on success, False on failure
bool flag (string $mailbox, string|array $messages, string $flag)
  • string $mailbox: Mailbox name
  • string|array $messages: Message UID(s)
  • string $flag: Flag name
getACL (line 2906)

Send the GETACL command (RFC4314)

  • return: User-rights array on success, NULL on error
  • since: 0.5-beta
array getACL (string $mailbox)
  • string $mailbox: Mailbox name
getAnnotation (line 3204)

Send the GETANNOTATION command (draft-daboo-imap-annotatemore)

  • return: Annotations result on success, NULL on error
  • since: 0.5-beta
array getAnnotation (string $mailbox, array $entries, array $attribs)
  • string $mailbox: Mailbox name
  • array $entries: Entries names
  • array $attribs: Attribs names
getCapability (line 437)

Capabilities checker

  • return: Capability values array for key=value pairs, true/false for others
mixed getCapability (string $name)
  • string $name: Capability name
getHierarchyDelimiter (line 637)

Detects hierarchy delimiter

  • return: The delimiter
string getHierarchyDelimiter ()
getMetadata (line 3061)

Send the GETMETADATA command (RFC5464)

  • return: GETMETADATA result on success, NULL on error
  • since: 0.5-beta
array getMetadata (string $mailbox, array $entries, [array $options = array()])
  • string $mailbox: Mailbox name
  • array $entries: Entries
  • array $options: Command options (with MAXSIZE and DEPTH keys)
getNamespace (line 664)

NAMESPACE handler (RFC 2342)

  • return: Namespace data hash (personal, other, shared)
array getNamespace ()
getQuota (line 2801)

Returns QUOTA information

  • return: Quota information
array getQuota ()
getStructure (line 3295)

Returns BODYSTRUCTURE for the specified message.

  • return: Body structure array or False on error.
  • since: 0.6
array/bool getStructure (string $mailbox, int $id, [bool $is_uid = false])
  • string $mailbox: Folder name
  • int $id: Message sequence number or UID
  • bool $is_uid: True if $id is an UID
handlePartBody (line 2446)
void handlePartBody ( $mailbox,  $id, [ $is_uid = false], [ $part = ''], [ $encoding = NULL], [ $print = NULL], [ $file = NULL], [ $formatted = false], [ $max_bytes = 0])
  • $mailbox
  • $id
  • $is_uid
  • $part
  • $encoding
  • $print
  • $file
  • $formatted
  • $max_bytes
id (line 1450)

Executes ID command (RFC2971)

  • return: Server identification information key/value hash
  • since: 0.6
array id ([array $items = array()])
  • array $items: Client identification information key/value hash
ID2UID (line 1872)

Returns message unique identifier (UID)

  • return: Message unique identifier
int ID2UID (string $mailbox,  $id, int $uid)
  • string $mailbox: Mailbox name
  • int $uid: Message sequence identifier
  • $id
index (line 1684)

Simulates SORT command by using FETCH and sorting.

  • return: Response data
rcube_result_index index (string $mailbox, string|array $message_set, [string $index_field = ''], [bool $skip_deleted = true], [bool $uidfetch = false], [bool $return_uid = false])
  • string $mailbox: Mailbox name
  • string|array $message_set: Searching criteria (list of messages to return)
  • string $index_field: Field to sort by (ARRIVAL, CC, DATE, FROM, SIZE, SUBJECT, TO)
  • bool $skip_deleted: Makes that DELETED messages will be skipped
  • bool $uidfetch: Enables UID FETCH usage
  • bool $return_uid: Enables returning UIDs instead of IDs
listMailboxes (line 1231)

Returns list of mailboxes

  • return: List of mailboxes or hash of options if $status_opts argument is non-empty.
array listMailboxes (string $ref, string $mailbox, [array $status_opts = array()], [array $select_opts = array()])
  • string $ref: Reference name
  • string $mailbox: Mailbox name
  • array $status_opts: (see self::_listMailboxes)
  • array $select_opts: (see self::_listMailboxes)
listRights (line 2946)

Send the LISTRIGHTS command (RFC4314)

  • return: List of user rights
  • since: 0.5-beta
array listRights (string $mailbox, string $user)
  • string $mailbox: Mailbox name
  • string $user: User name
listSubscribed (line 1246)

Returns list of subscribed mailboxes

  • return: List of mailboxes or hash of options if $status_opts argument is non-empty.
array listSubscribed (string $ref, string $mailbox, [array $status_opts = array()])
  • string $ref: Reference name
  • string $mailbox: Mailbox name
  • array $status_opts: (see self::_listMailboxes)
login (line 615)

LOGIN Authentication

  • return: Connection resourse on success, error code on error
resource login (string $user,  $password, string $pass)
  • string $user
  • string $pass
  • $password
move (line 1993)

Moves message(s) from one folder to another.

  • return: True on success, False on failure
bool move (string|array $messages, string $from, string $to)
  • string|array $messages: Message UID(s)
  • string $from: Mailbox name
  • string $to: Destination mailbox name
multLine (line 206)

Reads more data from the connection stream when provided data contain string literal

  • return: Line of text response
string multLine (string $line, [bool $escape = false])
  • string $line: Response text
  • bool $escape: Enables escaping
myRights (line 2977)

Send the MYRIGHTS command (RFC4314)

  • return: MYRIGHTS response on success, NULL on error
  • since: 0.5-beta
array myRights (string $mailbox)
  • string $mailbox: Mailbox name
nextTag (line 3384)

Creates next command identifier (tag)

  • return: Command identifier
  • since: 0.5-beta
string nextTag ()
parseResult (line 285)

Response parser.

  • return: Response status
int parseResult (string $string, [string $err_prefix = ''])
  • string $string: Response text
  • string $err_prefix: Error message prefix
putLine (line 90)

Send simple (one line) command to the connection stream

void putLine (string $string, [bool $endln = true], int 2)
  • string $string: Command string
  • bool $endln: True if CRLF need to be added at the end of command
  • int 2: Number of bytes sent, False on error
putLineC (line 118)

Send command to the connection stream with Command Continuation Requests (RFC3501 7.5) and LITERAL+ (RFC2088) support

  • return: Number of bytes sent, False on error
int|bool putLineC (string $string, [bool $endln = true])
  • string $string: Command string
  • bool $endln: True if CRLF need to be added at the end of command
readBytes (line 234)

Reads specified number of bytes from the connection stream

  • return: Response text
string readBytes (int $bytes)
  • int $bytes: Number of bytes to get
readLine (line 169)

Reads line from the connection stream

  • return: Line of text response
string readLine ([int $size = 1024])
  • int $size: Buffer size
readReply (line 262)

Reads complete response to the IMAP command

  • return: Response text
string readReply ([ &$untagged = null], array $untagged)
  • array $untagged: Will be filled with untagged response lines
  • &$untagged
renameFolder (line 1173)

Folder renaming (RENAME)

  • return: True on success, False on error
bool renameFolder ( $from,  $to, string $mailbox)
  • string $mailbox: Mailbox name
  • $from
  • $to
search (line 1626)

Executes SEARCH command

  • return: Result data
rcube_result_index search (string $mailbox, string $criteria, [bool $return_uid = false], [array $items = array()])
  • string $mailbox: Mailbox name
  • string $criteria: Searching criteria
  • bool $return_uid: Enable UID in result instead of sequence ID
  • array $items: Return items (MIN, MAX, COUNT, ALL)
select (line 924)

Executes SELECT command (if mailbox is already not in selected state)

  • return: True on success, false on error
boolean select (string $mailbox, [array $qresync_data = null])
  • string $mailbox: Mailbox name
  • array $qresync_data: QRESYNC data (RFC5162)
setACL (line 2866)

Send the SETACL command (RFC4314)

  • return: True on success, False on failure
  • since: 0.5-beta
boolean setACL (string $mailbox, string $user, mixed $acl)
  • string $mailbox: Mailbox name
  • string $user: User name
  • mixed $acl: ACL string or array
setAnnotation (line 3152)

Send the SETANNOTATION command (draft-daboo-imap-annotatemore)

  • return: True on success, False on failure
  • since: 0.5-beta
boolean setAnnotation (string $mailbox, array $data)
  • string $mailbox: Mailbox name
  • array $data: Data array where each item is an array with three elements: entry name, attribute name, value
setDebug (line 3766)

Set the value of the debugging flag.

  • since: 0.5-stable
void setDebug (boolean $debug, [ $handler = null])
  • boolean $debug: New value for the debugging flag.
  • $handler
setError (line 369)

Error code/message setter.

void setError ( $code, [ $msg = ''])
  • $code
  • $msg
setMetadata (line 3003)

Send the SETMETADATA command (RFC5464)

  • return: True on success, False on failure
  • since: 0.5-beta
boolean setMetadata (string $mailbox, array $entries)
  • string $mailbox: Mailbox name
  • array $entries: Entry-value array (use NULL value as NIL)
sort (line 1540)

Executes SORT command

  • return: Response data
rcube_result_index sort (string $mailbox, string $field, [string $add = ''], [bool $return_uid = false], [string $encoding = 'US-ASCII'])
  • string $mailbox: Mailbox name
  • string $field: Field to sort by (ARRIVAL, CC, DATE, FROM, SIZE, SUBJECT, TO)
  • string $add: Searching criteria
  • bool $return_uid: Enables UID SORT usage
  • string $encoding: Character set
sortHeaders (line 2321)
void sortHeaders ( $a,  $field,  $flag)
  • $a
  • $field
  • $flag
startsWith (line 386)

Checks response status.

Checks if command response line starts with specified prefix (or * BYE/BAD)

  • return: True any check is true or connection is closed.
bool startsWith (string $string, string $match, [bool $error = false], [bool $nonempty = false])
  • string $string: Response text
  • string $match: Prefix to match with (case-sensitive)
  • bool $error: Enables BYE/BAD checking
  • bool $nonempty: Enables empty response checking
status (line 1021)

Executes STATUS command

  • return: Status item-value hash
  • since: 0.5-beta
array status (string $mailbox, [array $items = array()])
  • string $mailbox: Mailbox name
  • array $items: Additional requested item names. By default MESSAGES and UNSEEN are requested. Other defined in RFC3501: UIDNEXT, UIDVALIDITY, RECENT
subscribe (line 1128)

Folder subscription (SUBSCRIBE)

  • return: True on success, False on error
boolean subscribe (string $mailbox)
  • string $mailbox: Mailbox name
thread (line 1588)

Executes THREAD command

  • return: Thread data
rcube_result_thread thread (string $mailbox, [string $algorithm = 'REFERENCES'], [string $criteria = ''], [bool $return_uid = false], [string $encoding = 'US-ASCII'])
  • string $mailbox: Mailbox name
  • string $algorithm: Threading algorithm (ORDEREDSUBJECT, REFERENCES, REFS)
  • string $criteria: Searching criteria
  • bool $return_uid: Enables UIDs in result instead of sequence numbers
  • string $encoding: Character set
UID2ID (line 1851)

Returns message sequence identifier

  • return: Message sequence identifier
int UID2ID (string $mailbox, int $uid)
  • string $mailbox: Mailbox name
  • int $uid: Message unique identifier (UID)
unflag (line 1914)

Unsets flag of the message(s)

  • return: True on success, False on failure
bool unflag (string $mailbox, string|array $messages, string $flag)
  • string $mailbox: Mailbox name
  • string|array $messages: Message UID(s)
  • string $flag: Flag name
unsubscribe (line 1143)

Folder unsubscription (UNSUBSCRIBE)

  • return: True on success, False on error
boolean unsubscribe (string $mailbox)
  • string $mailbox: Mailbox name
Class Constants
COMMAND_CAPABILITY = 2 (line 72)
COMMAND_LASTLINE = 4 (line 73)
COMMAND_NORESPONSE = 1 (line 71)
ERROR_BAD = -2 (line 65)
ERROR_BYE = -3 (line 66)
ERROR_COMMAND = -5 (line 68)
ERROR_NO = -1 (line 64)
ERROR_OK = 0 (line 63)
ERROR_READONLY = -6 (line 69)
ERROR_UNKNOWN = -4 (line 67)

Documentation generated on Fri, 03 May 2013 12:45:02 +0200 by phpDocumentor 1.4.4