Check connection state, connect if not connected.
bool
check_connection
()
Redefined in descendants as:
Checks the PERMANENTFLAGS capability of the current folder and returns true if the given flag is supported by the server.
boolean
check_permflag
(string $flag)
-
string
$flag: Permanentflag name
Redefined in descendants as:
-
rcube_imap::check_permflag()
: Checks the PERMANENTFLAGS capability of the current folder and returns true if the given flag is supported by the IMAP server
Clears the cache.
void
clear_cache
([string $key = null], [boolean $prefix_mode = false])
-
string
$key: Cache key name or pattern
-
boolean
$prefix_mode: Enable it to clear all keys starting with prefix specified in $key
Redefined in descendants as:
Remove all messages in a folder..
boolean
clear_folder
([string $folder = null])
-
string
$folder: Folder name
Close connection. Usually done on script shutdown
void
close
()
Redefined in descendants as:
Connect to the server
boolean
connect
(string $host, string $user, string $pass, [integer $port = 143], [string $use_ssl = null])
-
string
$host: Host to connect
-
string
$user: Username for IMAP account
-
string
$pass: Password for IMAP account
-
integer
$port: Port to connect to
-
string
$use_ssl: SSL schema (either ssl or tls) or null if plain connection
Redefined in descendants as:
Copy message(s) from one mailbox to another.
boolean
copy_message
(mixed $uids, string $to, [string $from = null])
-
mixed
$uids: Message UIDs as array or comma-separated string, or '*'
-
string
$to: Target folder
-
string
$from: Source folder
Redefined in descendants as:
Get messages count for a specific folder.
int
count
([string $folder = null], [string $mode = 'ALL'], [boolean $force = false], [boolean $status = true])
-
string
$folder: Folder name
-
string
$mode: Mode for count [ALL|THREADS|UNSEEN|RECENT]
-
boolean
$force: Force reading from server and update cache
-
boolean
$status: Enables storing folder status info (max UID/count), required for folder_status()
Redefined in descendants as:
Create all folders specified as default
void
create_default_folders
()
Redefined in descendants as:
Create a new folder on the server.
boolean
create_folder
(string $folder, [boolean $subscribe = false])
-
string
$folder: New folder name
-
boolean
$subscribe: True if the newvfolder should be subscribed
Redefined in descendants as:
Removes any <identifier,rights> pair for the specified user from the ACL for the specified folder (DELETEACL).
boolean
delete_acl
(string $folder, string $user)
-
string
$folder: Folder name
-
string
$user: User name
Redefined in descendants as:
-
rcube_imap::delete_acl()
: Removes any <identifier,rights> pair for the specified user from the ACL for the specified folder (DELETEACL)
Remove a folder from the server.
boolean
delete_folder
(string $folder)
-
string
$folder: Folder name
Redefined in descendants as:
Mark message(s) as deleted and expunge.
boolean
delete_message
(mixed $uids, [string $folder = null])
-
mixed
$uids: Message UIDs as array or comma-separated string, or '*'
-
string
$folder: Source folder
Redefined in descendants as:
Unsets metadata/annotations (SETMETADATA/SETANNOTATION)
boolean
delete_metadata
(string $folder, array $entries)
-
string
$folder: Folder name (empty for server metadata)
-
array
$entries: Entry names array
Redefined in descendants as:
Delete outdated cache entries
void
expunge_cache
()
Redefined in descendants as:
Send expunge command and clear the cache.
boolean
expunge_folder
([string $folder = null], [boolean $clear_cache = true])
-
string
$folder: Folder name
-
boolean
$clear_cache: False if cache should not be cleared
Expunge message(s) and clear the cache.
boolean
expunge_message
(mixed $uids, [string $folder = null], [boolean $clear_cache = true])
-
mixed
$uids: Message UIDs as array or comma-separated string, or '*'
-
string
$folder: Folder name
-
boolean
$clear_cache: False if cache should not be cleared
Redefined in descendants as:
Gets folder attributes (from LIST response, e.g. \Noselect, \Noinferiors).
array
folder_attributes
(string $folder, [bool $force = false])
-
string
$folder: Folder name
-
bool
$force: Set to True if attributes should be refreshed
Redefined in descendants as:
Gets connection (and current folder) data: UIDVALIDITY, EXISTS, RECENT, PERMANENTFLAGS, UIDNEXT, UNSEEN
array
folder_data
(string $folder)
-
string
$folder: Folder name
Redefined in descendants as:
-
rcube_imap::folder_data()
: Gets connection (and current folder) data: UIDVALIDITY, EXISTS, RECENT, PERMANENTFLAGS, UIDNEXT, UNSEEN
Checks if folder exists and is subscribed
boolean
folder_exists
(string $folder, [boolean $subscription = false])
-
string
$folder: Folder name
-
boolean
$subscription: Enable subscription checking
Redefined in descendants as:
Returns extended information about the folder.
array
folder_info
(string $folder)
-
string
$folder: Folder name
Redefined in descendants as:
Returns the namespace where the folder is in
string
folder_namespace
(string $folder)
-
string
$folder: Folder name
Redefined in descendants as:
Get folder size (size of all messages in a folder)
int
folder_size
(string $folder)
-
string
$folder: Folder name
Redefined in descendants as:
Returns current status of a folder
int
folder_status
([string $folder = null])
-
string
$folder: Folder name
Redefined in descendants as:
Synchronizes messages cache.
void
folder_sync
(string $folder)
-
string
$folder: Folder name
Redefined in descendants as:
Returns the access control list for a folder (GETACL).
array
get_acl
(string $folder)
-
string
$folder: Folder name
Redefined in descendants as:
Fetch message body of a specific message from the server
string
get_body
(int $uid, [ $part = 1])
-
int
$uid: Message UID
-
$part
Returns cached value
mixed
get_cache
(string $key)
Redefined in descendants as:
Returns the storage server's (IMAP) capability
mixed
get_capability
(string $cap)
-
string
$cap: Capability name
Redefined in descendants as:
Returns code of last error
int
get_error_code
()
Redefined in descendants as:
Returns message of last error
string
get_error_str
()
Redefined in descendants as:
Returns the currently used folder name
string
get_folder
()
Returns the delimiter that is used by the server for folder hierarchy separation.
string
get_hierarchy_delimiter
()
Redefined in descendants as:
Fetch message headers and body structure from the server and build an object structure similar to the one generated by PEAR::Mail_mimeDecode
-
int
$uid: Message UID to fetch
-
string
$folder: Folder to read from
Redefined in descendants as:
-
rcube_imap::get_message()
: Fetch message headers and body structure from the IMAP server and build an object structure similar to the one generated by PEAR::Mail_mimeDecode
Return message headers object of a specific message
rcube_mail_header
get_message_headers
(
$uid, [
string $folder =
null], [
bool $force =
false],
int $id)
-
int
$id: Message sequence ID or UID
-
string
$folder: Folder to read from
-
bool
$force: True to skip cache
-
$uid
Redefined in descendants as:
Fetch message body of a specific message from the server
string
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])
-
int
$uid: Message UID
-
string
$part: Part number
-
rcube_message_part
$o_part: Part object created by get_structure()
-
mixed
$print: True to print part, ressource to write part contents in
-
resource
$fp: File pointer to save the message part
-
boolean
$skip_charset_conv: Disables charset conversion
Redefined in descendants as:
Returns folder metadata/annotations (GETMETADATA/GETANNOTATION).
array
get_metadata
(string $folder, array $entries, [array $options = array()])
-
string
$folder: Folder name (empty for server metadata)
-
array
$entries: Entries
-
array
$options: Command options (with MAXSIZE and DEPTH keys)
Redefined in descendants as:
Get namespace
array
get_namespace
([string $name = null])
-
string
$name: Namespace array index: personal, other, shared, prefix
Redefined in descendants as:
Gets internal list page number.
int
get_page
()
Get internal page size
int
get_pagesize
()
Get mailbox quota information.
mixed
get_quota
()
Redefined in descendants as:
Returns the whole message source as string (or saves to a file)
string
get_raw_body
(int $uid, [resource $fp = null])
-
int
$uid: Message UID
-
resource
$fp: File pointer to save the message
Redefined in descendants as:
Returns the message headers as string
string
get_raw_headers
(int $uid)
Redefined in descendants as:
Returns code of last command response
int
get_response_code
()
Redefined in descendants as:
Return the saved search set.
array
get_search_set
()
Redefined in descendants as:
Get current threading flag.
mixed
get_threading
()
Return sorted list of message UIDs
-
string
$folder: Folder to get index from
-
string
$sort_field: Sort column
-
string
$sort_order: Sort order [ASC, DESC]
Redefined in descendants as:
Checks connection state.
boolean
is_connected
()
Redefined in descendants as:
Get a list of all folders available on the server.
array
list_folders
([string $root = ''], [string $name = '*'], [mixed $filter = null], [string $rights = null], [bool $skip_sort = false])
-
string
$root: IMAP root dir
-
string
$name: Optional name pattern
-
mixed
$filter: Optional filter
-
string
$rights: Optional ACL requirements
-
bool
$skip_sort: Enable to return unsorted list (for better performance)
Redefined in descendants as:
Get a list of subscribed folders.
array
list_folders_subscribed
([string $root = ''], [string $name = '*'], [string $filter = null], [string $rights = null], [bool $skip_sort = false])
-
string
$root: Optional root folder
-
string
$name: Optional name pattern
-
string
$filter: Optional filter
-
string
$rights: Optional ACL requirements
-
bool
$skip_sort: Enable to return unsorted list (for better performance)
Redefined in descendants as:
Public method for listing headers.
array
list_messages
([string $folder = null], [int $page = null], [string $sort_field = null], [string $sort_order = null], [int $slice = 0])
-
string
$folder: Folder name
-
int
$page: Current page to list
-
string
$sort_field: Header field to sort by
-
string
$sort_order: Sort order [ASC|DESC]
-
int
$slice: Number of slice items to extract from result array
Redefined in descendants as:
Returns information about what rights can be granted to the user (identifier) in the ACL for the folder (LISTRIGHTS).
array
list_rights
(string $folder, string $user)
-
string
$folder: Folder name
-
string
$user: User name
Redefined in descendants as:
-
rcube_imap::list_rights()
: Returns information about what rights can be granted to the user (identifier) in the ACL for the folder (LISTRIGHTS)
Modify folder name according to namespace.
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.
string
mod_folder
(string $folder, [string $mode = 'out'])
-
string
$folder: Folder name
-
string
$mode: Mode name (out/in)
Redefined in descendants as:
Move message(s) from one folder to another.
boolean
move_message
(mixed $uids, string $to, [string $from = null])
-
mixed
$uids: Message UIDs as array or comma-separated string, or '*'
-
string
$to: Target folder
-
string
$from: Source folder
Redefined in descendants as:
Returns the set of rights that the current user has to a folder (MYRIGHTS).
array
my_rights
(string $folder)
-
string
$folder: Folder name
Redefined in descendants as:
Parse message UIDs input
array
parse_uids
(mixed $uids)
-
mixed
$uids: UIDs array or comma-separated list or '*' or '1:*'
Sends the whole message source to stdout
void
print_raw_body
( $uid)
Redefined in descendants as:
Refresh saved search set
array
refresh_search
()
Redefined in descendants as:
Set a new name to an existing folder
boolean
rename_folder
(string $folder, string $new_name)
-
string
$folder: Folder to rename
-
string
$new_name: New folder name
Redefined in descendants as:
Append a mail message (source) to a specific folder.
int|bool
save_message
(string $folder, &$message, [string $headers = ''], [boolean $is_file = false], string $message)
-
string
$folder: Target folder
-
string
$message: The message source string or filename
-
string
$headers: Headers string if $message contains only the body
-
boolean
$is_file: True if $message is a filename
-
&$message
Redefined in descendants as:
Invoke search request to the server.
void
search
([string $folder = null], [string $str = 'ALL'], [string $charset = null], [string $sort_field = null])
-
string
$folder: Folder name to search in
-
string
$str: Search criteria
-
string
$charset: Search charset
-
string
$sort_field: Header field to sort by
Redefined in descendants as:
Direct (real and simple) search request (without result sorting and caching).
-
string
$folder: Folder name to search in
-
string
$str: Search string
Redefined in descendants as:
Changes the ACL on the specified folder (SETACL)
boolean
set_acl
(string $folder, string $user, string $acl)
-
string
$folder: Folder name
-
string
$user: User name
-
string
$acl: ACL string
Redefined in descendants as:
Set default message charset.
This will be used for message decoding if a charset specification is not available
void
set_charset
(string $cs)
-
string
$cs: Charset string
Activate/deactivate debug mode.
void
set_debug
([boolean $dbg = true])
-
boolean
$dbg: True if conversation with the server should be logged
Redefined in descendants as:
This list of folders will be listed above all other folders
void
set_default_folders
(array $arr)
-
array
$arr: Indexed list of folder names
Set message flag to one or several messages
bool
set_flag
(mixed $uids, string $flag, [string $folder = null], [boolean $skip_cache = false])
-
mixed
$uids: Message UIDs as array or comma-separated string, or '*'
-
string
$flag: Flag to set: SEEN, UNDELETED, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT
-
string
$folder: Folder name
-
boolean
$skip_cache: True to skip message cache clean up
Redefined in descendants as:
Set internal folder reference.
All operations will be perfomed on this folder.
void
set_folder
(string $folder)
-
string
$folder: Folder name
Redefined in descendants as:
Sets metadata/annotations (SETMETADATA/SETANNOTATION)
boolean
set_metadata
(string $folder, array $entries)
-
string
$folder: Folder name (empty for server metadata)
-
array
$entries: Entry-value array (use NULL value as NIL)
Redefined in descendants as:
Set connection and class options
void
set_options
(array $opt)
-
array
$opt: Options array
Set internal list page number.
void
set_page
(int $page)
-
int
$page: Page number to list
Set internal page size
void
set_pagesize
(int $size)
-
int
$size: Number of messages to display on one page
Save a search result for future message listing methods.
void
set_search_set
(mixed $set)
-
mixed
$set: Search set in driver specific format
Redefined in descendants as:
Sets threading flag to the best supported THREAD algorithm.
Enable/Disable threaded mode.
mixed
set_threading
([boolean $enable = false])
-
boolean
$enable: TRUE to enable and FALSE
Subscribe to a specific folder(s)
boolean
subscribe
(array $folders)
-
array
$folders: Folder name(s)
Redefined in descendants as:
Remove message flag for one or several messages
bool
unset_flag
(mixed $uids, string $flag, [string $folder = null])
-
mixed
$uids: Message UIDs as array or comma-separated string, or '*'
-
string
$flag: Flag to unset: SEEN, DELETED, RECENT, ANSWERED, DRAFT, MDNSENT
-
string
$folder: Folder name
Unsubscribe folder(s)
boolean
unsubscribe
(array $folders)
-
array
$folders: Folder name(s)
Redefined in descendants as: