rcube_imap

Extends \rcube_storage

Interface class for accessing an IMAP server

package

Framework

subpackage

Storage

author

Thomas Bruederli

author

Aleksander Machniak

Methods

Object constructor.

__construct() 

Magic getter for backward compat.

__get($name) 
deprecated

.

Arguments

$name

Connect to the server

connect(string $host, string $user, string $pass, integer $port = 143, string $use_ssl = null) : boolean
inherited abstract

Arguments

$host

string

Host to connect

$user

string

Username for IMAP account

$pass

string

Password for IMAP account

$port

integer

Port to connect to

$use_ssl

string

SSL schema (either ssl or tls) or null if plain connection

Response

boolean

TRUE on success, FALSE on failure

Close connection. Usually done on script shutdown

close() 
inherited abstract

Check connection state, connect if not connected.

check_connection() : bool
inherited abstract

Response

bool

Connection state.

Checks connection state.

is_connected() : boolean
inherited abstract

Response

boolean

TRUE on success, FALSE on failure

Returns code of last error

get_error_code() : int
inherited abstract

Response

int

Error code

Returns message of last error

get_error_str() : string
inherited abstract

Response

string

Error message

Returns code of last command response

get_response_code() : int
inherited abstract

Response

int

Response code (class constant)

Activate/deactivate debug mode.

set_debug(boolean $dbg = true) 
inherited abstract

Arguments

$dbg

boolean

True if conversation with the server should be logged

Set internal folder reference.

set_folder(string $folder) 
inherited

All operations will be perfomed on this folder.

Arguments

$folder

string

Folder name

Save a search result for future message listing methods.

set_search_set(mixed $set) 
inherited abstract

Arguments

$set

mixed

Search set in driver specific format

Return the saved search set.

get_search_set() : array
inherited abstract

Response

array

Search set in driver specific format, NULL if search wasn't initialized

Returns the storage server's (IMAP) capability

get_capability(string $cap) : mixed
inherited abstract

Arguments

$cap

string

Capability name

Response

mixed

Capability value or TRUE if supported, FALSE if not

Checks the PERMANENTFLAGS capability of the current folder and returns true if the given flag is supported by the server.

check_permflag(string $flag) : boolean
inherited abstract

Arguments

$flag

string

Permanentflag name

Response

boolean

True if this flag is supported

Returns PERMANENTFLAGS of the specified folder

get_permflags(string $folder) : array

Arguments

$folder

string

Folder name

Response

array

Flags

Returns the delimiter that is used by the server for folder hierarchy separation.

get_hierarchy_delimiter() : string
inherited abstract

Response

string

Delimiter string

Get namespace

get_namespace(string $name = null) : array
inherited abstract

Arguments

$name

string

Namespace array index: personal, other, shared, prefix

Response

array

Namespace data

Sets delimiter and namespaces

set_env() 

Get messages count for a specific folder.

count(string $folder = null, string $mode = 'ALL', boolean $force = false, boolean $status = true) : int
inherited abstract

Arguments

$folder

string

Folder name

$mode

string

Mode for count [ALL|THREADS|UNSEEN|RECENT|EXISTS]

$force

boolean

Force reading from server and update cache

$status

boolean

Enables storing folder status info (max UID/count),

                     required for folder_status()

Response

int

Number of messages

protected method for getting nr of messages

countmessages(string $folder, string $mode = 'ALL', boolean $force = false, boolean $status = true) : int
see \rcube_imap::count()

Arguments

$folder

string

Folder name

$mode

string

Mode for count [ALL|THREADS|UNSEEN|RECENT|EXISTS]

$force

boolean

Force reading from server and update cache

$status

boolean

Enables storing folder status info (max UID/count),

                    required for folder_status()

Response

int

Number of messages

Public method for listing message flags

list_flags(string $folder, array $uids, int $mod_seq = null) : array
inherited abstract

Arguments

$folder

string

Folder name

$uids

array

Message UIDs

$mod_seq

int

Optional MODSEQ value

Response

array

Indexed array with message flags

Public method for listing headers.

list_messages(string $folder = null, int $page = null, string $sort_field = null, string $sort_order = null, int $slice) : array
inherited abstract

Arguments

$folder

string

Folder name

$page

int

Current page to list

$sort_field

string

Header field to sort by

$sort_order

string

Sort order [ASC|DESC]

$slice

int

Number of slice items to extract from result array

Response

array

Indexed array with message header objects

protected method for listing message headers

_list_messages(string $folder = '', int $page = NULL, string $sort_field = NULL, string $sort_order = NULL, int $slice) : array
see \rcube_imap::list_messages

Arguments

$folder

string

Folder name

$page

int

Current page to list

$sort_field

string

Header field to sort by

$sort_order

string

Sort order [ASC|DESC]

$slice

int

Number of slice items to extract from result array

Response

array

Indexed array with message header objects

protected method for listing message headers using threads

list_thread_messages(string $folder, int $page, int $slice) : array
see \rcube_imap::list_messages

Arguments

$folder

string

Folder name

$page

int

Current page to list

$slice

int

Number of slice items to extract from result array

Response

array

Indexed array with message header objects

Method for fetching threads data

threads(string $folder) : \rcube_imap_thread

Arguments

$folder

string

Folder name

Response

\rcube_imap_thread

Thread data object

Method for direct fetching of threads data

threads_direct(string $folder) : \rcube_imap_thread

Arguments

$folder

string

Folder name

Response

\rcube_imap_thread

Thread data object

protected method for fetching threaded messages headers

fetch_thread_headers(string $folder, \rcube_result_thread $threads, int $page, int $slice) : array

Arguments

$folder

string

Folder name

$threads

\rcube_result_thread

Threads data object

$page

int

List page number

$slice

int

Number of threads to slice

Response

array

Messages headers

protected method for setting threaded messages flags: depth, has_children and unread_children

set_thread_flags(array &$headers, \rcube_result_thread $threads) : array

Arguments

$headers

array

Reference to headers array indexed by message UID

$threads

\rcube_result_thread

Threads data object

Response

array

Message headers array indexed by message UID

protected method for listing a set of message headers (search results)

list_search_messages(string $folder, int $page, int $slice) : array

Arguments

$folder

string

Folder name

$page

int

Current page to list

$slice

int

Number of slice items to extract from result array

Response

array

Indexed array with message header objects

protected method for listing a set of threaded message headers (search results)

list_search_thread_messages(string $folder, int $page, int $slice) : array
see \rcube_imap::list_search_messages()

Arguments

$folder

string

Folder name

$page

int

Current page to list

$slice

int

Number of slice items to extract from result array

Response

array

Indexed array with message header objects

Fetches messages headers (by UID)

fetch_headers(string $folder, array $msgs, bool $sort = true, bool $force = false) : array

Arguments

$folder

string

Folder name

$msgs

array

Message UIDs

$sort

bool

Enables result sorting by $msgs

$force

bool

Disables cache use

Response

array

Messages headers indexed by UID

Returns current status of a folder (compared to the last time use)

folder_status(string $folder = null, array &$diff = array()) : int
inherited abstract

Arguments

$folder

string

Folder name

$diff

array

Difference data

Response

int

Folder status

Stores folder statistic data in session

set_folder_stats(string $folder, string $name, mixed $data) 
TODO

: move to separate DB table (cache?)

Arguments

$folder

string

Folder name

$name

string

Data name

$data

mixed

Data value

Gets folder statistic data

get_folder_stats(string $folder) : array

Arguments

$folder

string

Folder name

Response

array

Stats data

Return sorted list of message UIDs

index(string $folder = null, string $sort_field = null, string $sort_order = null) : \rcube_result_index|\rcube_result_thread
inherited abstract

Arguments

$folder

string

Folder to get index from

$sort_field

string

Sort column

$sort_order

string

Sort order [ASC, DESC]

Response

\rcube_result_index|\rcube_result_thread

List of messages (UIDs)

Return sorted list of message UIDs ignoring current search settings.

index_direct(string $folder, string $sort_field = null, string $sort_order = null, \rcube_result_* $search = null) : \rcube_result_index

Doesn't uses cache by default.

Arguments

$folder

string

Folder to get index from

$sort_field

string

Sort column

$sort_order

string

Sort order [ASC, DESC]

$search

\rcube_result_*

Optional messages set to limit the result

Response

\rcube_result_index

Sorted list of message UIDs

Return index of threaded message UIDs

thread_index(string $folder = '', string $sort_field = NULL, string $sort_order = NULL) : \rcube_result_thread

Arguments

$folder

string

Folder to get index from

$sort_field

string

Sort column

$sort_order

string

Sort order [ASC, DESC]

Response

\rcube_result_thread

Message UIDs

Sort threaded result, using THREAD=REFS method if available.

sort_threads(\rcube_result_thread $threads) 

If not, use any method and re-sort the result in THREAD=REFS way.

Arguments

$threads

\rcube_result_thread

Threads result set

Direct (real and simple) search request (without result sorting and caching).

search_once(string $folder = null, string $str = 'ALL') : \rcube_result_index
inherited abstract

Arguments

$folder

string

Folder name to search in

$str

string

Search string

Response

\rcube_result_index

Search result (UIDs)

protected search method

search_index(string $folder, string $criteria = 'ALL', string $charset = NULL, string $sort_field = NULL) : \rcube_result_index|\rcube_result_thread
see \rcube_imap::search()

Arguments

$folder

string

Folder name

$criteria

string

Search criteria

$charset

string

Charset

$sort_field

string

Sorting field

Response

\rcube_result_index|\rcube_result_thread

Search results (UIDs)

Converts charset of search criteria string

convert_criteria(string $str, string $charset, string $dest_charset = 'US-ASCII') : string

Arguments

$str

string

Search string

$charset

string

Original charset

$dest_charset

string

Destination charset (default US-ASCII)

Response

string

Search string

Return message headers object of a specific message

get_message_headers($uid, string $folder = null, bool $force = false) : \rcube_message_header
inherited abstract

Arguments

$uid

$folder

string

Folder to read from

$force

bool

True to skip cache

Response

\rcube_message_header

Message headers

Fetch message headers and body structure from the server and build an object structure similar to the one generated by PEAR::Mail_mimeDecode

get_message(int $uid, string $folder = null) : object
inherited abstract

Arguments

$uid

int

Message UID to fetch

$folder

string

Folder to read from

Response

object

rcube_message_header Message data

Build message part object

structure_part(array $part, int $count, string $parent = '', $mime_headers = null) 

Arguments

$part

array

$count

int

$parent

string

$mime_headers

Set attachment filename from message part structure

set_part_filename(\rcube_message_part &$part, string $headers = null) 

Arguments

$part

\rcube_message_part

Part object

$headers

string

Part's raw headers

Get charset name from message structure (first part)

structure_charset(array $structure) : string

Arguments

$structure

array

Message structure

Response

string

Charset name

Fetch message body of a specific message from the server

get_message_part(int $uid, string $part = 1, \rcube_message_part $o_part = null, mixed $print = null, resource $fp = null, boolean $skip_charset_conv = false) : string
inherited abstract

Arguments

$uid

int

Message UID

$part

string

Part number

$o_part

\rcube_message_part

Part object created by get_structure()

$print

mixed

True to print part, ressource to write part contents in

$fp

resource

File pointer to save the message part

$skip_charset_conv

boolean

Disables charset conversion

Response

string

Message/part body if not printed

Returns the whole message source as string (or saves to a file)

get_raw_body(int $uid, resource $fp = null) : string
inherited abstract

Arguments

$uid

int

Message UID

$fp

resource

File pointer to save the message

Response

string

Message source string

Returns the message headers as string

get_raw_headers(int $uid) : string
inherited abstract

Arguments

$uid

int

Message UID

Response

string

Message headers string

Sends the whole message source to stdout

print_raw_body(int $uid, bool $formatted = true) 
inherited abstract

Arguments

$uid

int

Message UID

$formatted

bool

Enables line-ending formatting

Set message flag to one or several messages

set_flag(mixed $uids, string $flag, string $folder = null, boolean $skip_cache = false) : bool
inherited abstract

Arguments

$uids

mixed

Message UIDs as array or comma-separated string, or '*'

$flag

string

Flag to set: SEEN, UNDELETED, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT

$folder

string

Folder name

$skip_cache

boolean

True to skip message cache clean up

Response

bool

Operation status

Append a mail message (source) to a specific folder.

save_message(string $folder, string|array &$message, string $headers = '', boolean $is_file = false, array $flags = array(), mixed $date = null) : int|bool
inherited abstract

Arguments

$folder

string

Target folder

$message

string|array

The message source string or filename

                         or array (of strings and file pointers)

$headers

string

Headers string if $message contains only the body

$is_file

boolean

True if $message is a filename

$flags

array

Message flags

$date

mixed

Message internal date

Response

int|bool

Appended message UID or True on success, False on error

Move message(s) from one folder to another.

move_message(mixed $uids, string $to, string $from = null) : boolean
inherited abstract

Arguments

$uids

mixed

Message UIDs as array or comma-separated string, or '*'

$to

string

Target folder

$from

string

Source folder

Response

boolean

True on success, False on error

Copy message(s) from one mailbox to another.

copy_message(mixed $uids, string $to, string $from = null) : boolean
inherited abstract

Arguments

$uids

mixed

Message UIDs as array or comma-separated string, or '*'

$to

string

Target folder

$from

string

Source folder

Response

boolean

True on success, False on error

Mark message(s) as deleted and expunge.

delete_message(mixed $uids, string $folder = null) : boolean
inherited abstract

Arguments

$uids

mixed

Message UIDs as array or comma-separated string, or '*'

$folder

string

Source folder

Response

boolean

True on success, False on error

Expunge message(s) and clear the cache.

expunge_message(mixed $uids, string $folder = null, boolean $clear_cache = true) : boolean
inherited abstract

Arguments

$uids

mixed

Message UIDs as array or comma-separated string, or '*'

$folder

string

Folder name

$clear_cache

boolean

False if cache should not be cleared

Response

boolean

True on success, False on error

Get a list of subscribed folders.

list_folders_subscribed(string $root = '', string $name = '*', string $filter = null, string $rights = null, bool $skip_sort = false) : array
inherited abstract

Arguments

$root

string

Optional root folder

$name

string

Optional name pattern

$filter

string

Optional filter

$rights

string

Optional ACL requirements

$skip_sort

bool

Enable to return unsorted list (for better performance)

Response

array

List of folders

Method for direct folders listing (LSUB)

list_folders_subscribed_direct(string $root = '', string $name = '*') : array
see \rcube_imap::list_folders_subscribed()

Arguments

$root

string

Optional root folder

$name

string

Optional name pattern

Response

array

List of subscribed folders

Get a list of all folders available on the server.

list_folders(string $root = '', string $name = '*', mixed $filter = null, string $rights = null, bool $skip_sort = false) : array
inherited abstract

Arguments

$root

string

IMAP root dir

$name

string

Optional name pattern

$filter

mixed

Optional filter

$rights

string

Optional ACL requirements

$skip_sort

bool

Enable to return unsorted list (for better performance)

Response

array

Indexed array with folder names

Method for direct folders listing (LIST)

list_folders_direct(string $root = '', string $name = '*') : array
see \rcube_imap::list_folders()

Arguments

$root

string

Optional root folder

$name

string

Optional name pattern

Response

array

List of folders

Fix folders list by adding folders from other namespaces.

list_folders_update(array &$result, string $type = null) 

Needed on some servers eg. Courier IMAP

Arguments

$result

array

Reference to folders list

$type

string

Listing type (ext-subscribed, subscribed or all)

Filter the given list of folders according to access rights

filter_rights($a_folders, $rights) 

For performance reasons we assume user has full rights on all personal folders.

Arguments

$a_folders

$rights

Get mailbox quota information.

get_quota() : mixed
inherited abstract

Response

mixed

Quota info or False if not supported

Get folder size (size of all messages in a folder)

folder_size(string $folder) : int
inherited abstract

Arguments

$folder

string

Folder name

Response

int

Folder size in bytes, False on error

Subscribe to a specific folder(s)

subscribe(array $folders) : boolean
inherited abstract

Arguments

$folders

array

Folder name(s)

Response

boolean

True on success

Unsubscribe folder(s)

unsubscribe(array $folders) : boolean
inherited abstract

Arguments

$folders

array

Folder name(s)

Response

boolean

True on success

Create a new folder on the server.

create_folder(string $folder, boolean $subscribe = false) : boolean
inherited abstract

Arguments

$folder

string

New folder name

$subscribe

boolean

True if the newvfolder should be subscribed

Response

boolean

True on success, False on error

Set a new name to an existing folder

rename_folder(string $folder, string $new_name) : boolean
inherited abstract

Arguments

$folder

string

Folder to rename

$new_name

string

New folder name

Response

boolean

True on success, False on error

Remove a folder from the server.

delete_folder(string $folder) : boolean
inherited abstract

Arguments

$folder

string

Folder name

Response

boolean

True on success, False on error

Create all folders specified as default

create_default_folders() 
inherited

Checks if folder exists and is subscribed

folder_exists(string $folder, boolean $subscription = false) : boolean
inherited abstract

Arguments

$folder

string

Folder name

$subscription

boolean

Enable subscription checking

Response

boolean

True if folder exists, False otherwise

Returns the namespace where the folder is in

folder_namespace(string $folder) : string
inherited abstract

Arguments

$folder

string

Folder name

Response

string

One of 'personal', 'other' or 'shared'

Modify folder name according to namespace.

mod_folder(string $folder, string $mode = 'out') : string
inherited abstract

For output it removes prefix of the personal namespace if it's possible. For input it adds the prefix. Use it before creating a folder in root of the folders tree.

Arguments

$folder

string

Folder name

$mode

string

Mode name (out/in)

Response

string

Folder name

Gets folder attributes (from LIST response, e.g. \Noselect, \Noinferiors).

folder_attributes(string $folder, bool $force = false) : array
inherited abstract

Arguments

$folder

string

Folder name

$force

bool

Set to True if attributes should be refreshed

Response

array

Options list

Gets connection (and current folder) data: UIDVALIDITY, EXISTS, RECENT, PERMANENTFLAGS, UIDNEXT, UNSEEN

folder_data(string $folder) : array
inherited abstract

Arguments

$folder

string

Folder name

Response

array

Data

Returns extended information about the folder.

folder_info(string $folder) : array
inherited abstract

Arguments

$folder

string

Folder name

Response

array

Data

Synchronizes messages cache.

folder_sync(string $folder) 
inherited abstract

Arguments

$folder

string

Folder name

Get message header names for rcube_imap_generic::fetchHeader(s)

get_fetch_headers() : string

Response

string

Space-separated list of header names

Changes the ACL on the specified folder (SETACL)

set_acl(string $folder, string $user, string $acl) : boolean
inherited abstract

Arguments

$folder

string

Folder name

$user

string

User name

$acl

string

ACL string

Response

boolean

True on success, False on failure

Removes any <identifier,rights> pair for the specified user from the ACL for the specified folder (DELETEACL).

delete_acl(string $folder, string $user) : boolean
inherited abstract

Arguments

$folder

string

Folder name

$user

string

User name

Response

boolean

True on success, False on failure

Returns the access control list for a folder (GETACL).

get_acl(string $folder) : array
inherited abstract

Arguments

$folder

string

Folder name

Response

array

User-rights array on success, NULL on error

Returns information about what rights can be granted to the user (identifier) in the ACL for the folder (LISTRIGHTS).

list_rights(string $folder, string $user) : array
inherited abstract

Arguments

$folder

string

Folder name

$user

string

User name

Response

array

List of user rights

Returns the set of rights that the current user has to a folder (MYRIGHTS).

my_rights(string $folder) : array
inherited abstract

Arguments

$folder

string

Folder name

Response

array

MYRIGHTS response on success, NULL on error

Converts the METADATA extension entry name into the correct entry-attrib names for older ANNOTATEMORE version.

md2annotate(string $entry) : array

Arguments

$entry

string

Entry name

Response

array

Entry-attribute list, NULL if not supported (?)

Enable or disable indexes caching

set_caching(string $type) 

Arguments

$type

string

Cache type (@see rcube::get_cache)

Getter for IMAP cache object

get_cache_engine() 

Returns cached value

get_cache(string $key) : mixed
inherited abstract

Arguments

$key

string

Cache key

Response

mixed

Cached value

Update cache

update_cache(string $key, mixed $data) 

Arguments

$key

string

Cache key

$data

mixed

Data

Clears the cache.

clear_cache(string $key = null, boolean $prefix_mode = false) 
inherited abstract

Arguments

$key

string

Cache key name or pattern

$prefix_mode

boolean

Enable it to clear all keys starting

                        with prefix specified in $key

Enable or disable messages caching

set_messages_caching(boolean $set, int $mode = null) 

Arguments

$set

boolean

Flag

$mode

int

Cache mode

Getter for messages cache object

get_mcache_engine() 

Clears the messages cache.

clear_message_cache(string $folder = null, array $uids = null) 

Arguments

$folder

string

Folder name

$uids

array

Optional message UIDs to remove from cache

Delete outdated cache entries

cache_gc() 
inherited abstract

Validate the given input and save to local properties

set_sort_order(string $sort_field, string $sort_order) 

Arguments

$sort_field

string

Sort column

$sort_order

string

Sort order

Sort folders first by default folders and then in alphabethical order

sort_folder_list(array $a_folders, bool $skip_default = false) : array

Arguments

$a_folders

array

Folders list

$skip_default

bool

Skip default folders handling

Response

array

Sorted list

Recursive method for sorting folders

rsort($folder, $delimiter, &$list, &$out) 

Arguments

$folder

$delimiter

$list

$out

Find UID of the specified message sequence ID

id2uid(int $id, string $folder = null) : int

Arguments

$id

int

Message (sequence) ID

$folder

string

Folder name

Response

int

Message UID

Subscribe/unsubscribe a list of folders and update local cache

change_subscription($folders, $mode) 

Arguments

$folders

$mode

Increde/decrese messagecount for a specific folder

set_messagecount($folder, $mode, $increment) 

Arguments

$folder

$mode

$increment

Remove messagecount of a specific folder from cache

clear_messagecount($folder, $mode = null) 

Arguments

$folder

$mode

Converts date string/object into IMAP date/time format

date_format($date) 

Arguments

$date

This is our own debug handler for the IMAP connection

debug_handler(&$imap, $message) 
access

public

Arguments

$imap

$message

Deprecated methods (to be removed)

decode_address_list($input, $max = null, $decode = true, $fallback = null) 

Arguments

$input

$max

$decode

$fallback

decode_header

decode_header($input, $fallback = null) 

Arguments

$input

$fallback

decode_mime_string

decode_mime_string($input, $fallback = null) 
static

Arguments

$input

$fallback

mime_decode

mime_decode($input, $encoding = '7bit') 

Arguments

$input

$encoding

explode_header_string

explode_header_string($separator, $str, $remove_comments = false) 
static

Arguments

$separator

$str

$remove_comments

select_mailbox

select_mailbox($mailbox) 

Arguments

$mailbox

set_mailbox

set_mailbox($folder) 

Arguments

$folder

get_mailbox_name

get_mailbox_name() 

list_headers

list_headers($folder = '', $page = NULL, $sort_field = NULL, $sort_order = NULL, $slice) 

Arguments

$folder

$page

$sort_field

$sort_order

$slice

get_headers

get_headers($uid, $folder = null, $force = false) 

Arguments

$uid

$folder

$force

mailbox_status

mailbox_status($folder = null) 

Arguments

$folder

message_index

message_index($folder = '', $sort_field = NULL, $sort_order = NULL) 

Arguments

$folder

$sort_field

$sort_order

message_index_direct

message_index_direct($folder, $sort_field = null, $sort_order = null) 

Arguments

$folder

$sort_field

$sort_order

list_mailboxes

list_mailboxes($root = '', $name = '*', $filter = null, $rights = null, $skip_sort = false) 

Arguments

$root

$name

$filter

$rights

$skip_sort

list_unsubscribed

list_unsubscribed($root = '', $name = '*', $filter = null, $rights = null, $skip_sort = false) 

Arguments

$root

$name

$filter

$rights

$skip_sort

get_mailbox_size

get_mailbox_size($folder) 

Arguments

$folder

create_mailbox

create_mailbox($folder, $subscribe = false) 

Arguments

$folder

$subscribe

rename_mailbox

rename_mailbox($folder, $new_name) 

Arguments

$folder

$new_name

delete_mailbox

delete_mailbox($folder) 

Arguments

$folder

clear_mailbox

clear_mailbox($folder = null) 

Arguments

$folder

mailbox_exists

mailbox_exists($folder, $subscription = false) 

Arguments

$folder

$subscription

mailbox_namespace

mailbox_namespace($folder) 

Arguments

$folder

mod_mailbox

mod_mailbox($folder, $mode = 'out') 

Arguments

$folder

$mode

mailbox_attributes

mailbox_attributes($folder, $force = false) 

Arguments

$folder

$force

mailbox_data

mailbox_data($folder) 

Arguments

$folder

mailbox_info

mailbox_info($folder) 

Arguments

$folder

mailbox_sync

mailbox_sync($folder) 

Arguments

$folder

expunge

expunge($folder = '', $clear_cache = true) 

Arguments

$folder

$clear_cache

Set connection and class options

set_options(array $opt) 
inherited

Arguments

$opt

array

Options array

Set default message charset.

set_charset(string $cs) 
inherited

This will be used for message decoding if a charset specification is not available

Arguments

$cs

string

Charset string

This list of folders will be listed above all other folders

set_default_folders(array $arr) 
inherited

Arguments

$arr

array

Indexed list of folder names

Returns the currently used folder name

get_folder() : string
inherited

Response

string

Name of the folder

Set internal list page number.

set_page(int $page) 
inherited

Arguments

$page

int

Page number to list

Gets internal list page number.

get_page() : int
inherited

Response

int

Page number

Set internal page size

set_pagesize(int $size) 
inherited

Arguments

$size

int

Number of messages to display on one page

Get internal page size

get_pagesize() : int
inherited

Response

int

Number of messages to display on one page

Sets threading flag to the best supported THREAD algorithm.

set_threading(boolean $enable = false) : mixed
inherited

Enable/Disable threaded mode.

Arguments

$enable

boolean

TRUE to enable and FALSE

Response

mixed

Threading algorithm or False if THREAD is not supported

Get current threading flag.

get_threading() : mixed
inherited

Response

mixed

Threading algorithm or False if THREAD is not supported or disabled

Fetch message body of a specific message from the server

get_body(int $uid, $part = 1) : string
inherited
see \rcube_imap::get_message_part()

Arguments

$uid

int

Message UID

$part

Response

string

$part Message/part body

Remove message flag for one or several messages

unset_flag(mixed $uids, string $flag, string $folder = null) : bool
inherited
see \set_flag

Arguments

$uids

mixed

Message UIDs as array or comma-separated string, or '*'

$flag

string

Flag to unset: SEEN, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT

$folder

string

Folder name

Response

bool

Operation status

Parse message UIDs input

parse_uids(mixed $uids) : array
inherited

Arguments

$uids

mixed

UIDs array or comma-separated list or '' or '1:'

Response

array

Two elements array with UIDs converted to list and ALL flag

Send expunge command and clear the cache.

expunge_folder(string $folder = null, boolean $clear_cache = true) : boolean
inherited

Arguments

$folder

string

Folder name

$clear_cache

boolean

False if cache should not be cleared

Response

boolean

True on success, False on error

Remove all messages in a folder.

clear_folder(string $folder = null) : boolean
inherited

.

Arguments

$folder

string

Folder name

Response

boolean

True on success, False on error

Constants

UNKNOWN

UNKNOWN
inherited

NOPERM

NOPERM
inherited

READONLY

READONLY
inherited

TRYCREATE

TRYCREATE
inherited

INUSE

INUSE
inherited

OVERQUOTA

OVERQUOTA
inherited

ALREADYEXISTS

ALREADYEXISTS
inherited

NONEXISTENT

NONEXISTENT
inherited

CONTACTADMIN

CONTACTADMIN
inherited

Properties

Instance of connection object e.g. rcube_imap_generic

conn : mixed
inherited
var

Type(s)

mixed

Instance of rcube_imap_cache

mcache : \rcube_imap_cache
var

Type(s)

\rcube_imap_cache

Instance of rcube_cache

cache : \rcube_cache
var

Type(s)

\rcube_cache

Internal (in-memory) cache

icache : array
var

Type(s)

array

list_page

list_page : 

delimiter

delimiter : 

namespace

namespace : 

sort_field

sort_field : 

sort_order

sort_order : 

struct_charset

struct_charset : 

uid_id_map

uid_id_map : 

msg_headers

msg_headers : 

search_set

search_set : 
inherited

search_string

search_string : 

search_charset

search_charset : 

search_sort_field

search_sort_field : 

search_threads

search_threads : 

search_sorted

search_sorted : 

options

options : 
inherited

caching

caching : 

messages_caching

messages_caching : 

threading

threading : 
inherited

folder

folder : 
inherited

default_charset

default_charset : 
inherited

default_folders

default_folders : 
inherited

page_size

page_size : 
inherited

All (additional) headers used (in any way) by Roundcube Not listed here: DATE, FROM, TO, CC, REPLY-TO, SUBJECT, CONTENT-TYPE, LIST-POST (used for messages listing) are hardcoded in rcube_imap_generic::fetchHeaders()

all_headers : array
inherited
var

Type(s)

array