public interface to JMAP commands
| Methods | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public
|
__construct()
PUBLIC INTERFACE
PUBLIC INTERFACE |
# | ||||||||||||
public
|
get_special_use_mailboxes(string $type = false): array
Looks for special use folders like sent or trash
Looks for special use folders like sent or trash Parameters
|
# | ||||||||||||
public
|
get_mailbox_status(string $mailbox, array $args = ['UNSEEN', 'UIDVALIDITY', 'UIDNEXT', 'MESSAGES', 'RECENT'])
Get the status of a mailbox
Get the status of a mailbox Parameters
|
# | ||||||||||||
public
|
append_start(string $mailbox, integer $size, boolean $seen = true): true
Fake start to IMAP APPEND
Fake start to IMAP APPEND Parameters
|
# | ||||||||||||
public
|
append_feed(string $string): boolean
Normally this would be a single line of data to feed to an IMAP APPEND
command. For JMAP it is the whole message which…
Normally this would be a single line of data to feed to an IMAP APPEND command. For JMAP it is the whole message which we first upload to the server then import into the mailbox Parameters
|
# | ||||||||||||
public
|
append_end(): boolean
Fake end of IMAP APPEND command.
Fake end of IMAP APPEND command. |
# | ||||||||||||
public
|
start_message_stream(string $uid, string $message_part): integer
Normally whould start streaming data for an IMAP message part, but with
JMAP we donwload the whole thing into $this-…
Normally whould start streaming data for an IMAP message part, but with JMAP we donwload the whole thing into $this->streaming_msg Parameters
|
# | ||||||||||||
public
|
read_stream_line(integer $size = 1024): string
Normally would stream one line from IMAP at a time, with JMAP it's the
whole thing
Normally would stream one line from IMAP at a time, with JMAP it's the whole thing Parameters
|
# | ||||||||||||
public
|
create_mailbox(string $mailbox): boolean
Create a new mailbox
Create a new mailbox Parameters
|
# | ||||||||||||
public
|
delete_mailbox(string $mailbox): boolean
Delete an existing mailbox
Delete an existing mailbox Parameters
|
# | ||||||||||||
public
|
rename_mailbox(string $mailbox, string $new_mailbox): boolean
Rename a mailbox
Rename a mailbox Parameters
|
# | ||||||||||||
public
|
get_state(): string
Return the IMAP connection state (authenticated, connected, etc)
Return the IMAP connection state (authenticated, connected, etc) |
# | ||||||||||||
public
|
show_debug(): array
Return debug info about the JMAP session requests and responses
Return debug info about the JMAP session requests and responses |
# | ||||||||||||
public
|
get_first_message_part(string $uid, string $type, string $subtype = false, array $struct = false): array
Fetch the first viewable message part of an E-mail
Fetch the first viewable message part of an E-mail Parameters
|
# | ||||||||||||
public
|
get_mailbox_page(
string $mailbox,
string $sort,
$rev,
string $filter,
int $offset = 0,
int $limit = 0,
string $keyword = false,
): array
Return a list of headers and UIDs for a page of a mailbox
Return a list of headers and UIDs for a page of a mailbox Parameters
Returnslist of headers |
# | ||||||||||||
public
|
get_folder_list_by_level(string $level = false): array
Return all the folders contained at a hierarchy level, and if possible, if they have sub-folders
Return all the folders contained at a hierarchy level, and if possible, if they have sub-folders Parameters
Returnslist of matching folders |
# | ||||||||||||
public
|
get_quota(array $quota_root = ''): array
Use the JMAP Quota/get method to fetch quota information for a specific quota root.
Use the JMAP Quota/get method to fetch quota information for a specific quota root. This method sends a request to the JMAP server to retrieve quota information for a specified quota root (e.g., a specific folder like INBOX or Sent). The response is parsed to extract details about the quota, including the used space and hard limit. Parameters
Returnslist of quota details |
# | ||||||||||||
public
|
get_quota_root(string $mailbox): array
Use the JMAP Quota/get method to fetch quota root information for all available quotas.
Use the JMAP Quota/get method to fetch quota root information for all available quotas. This method sends a request to the JMAP server to retrieve quota information for all quotas associated with the account. The response is parsed to extract details about each quota, including the used space and hard limit. Parameters
ReturnsAn array of quota details |
# | ||||||||||||
public
|
get_capability()
|
# | ||||||||||||
public
|
dump_cache(): array
Return cached data
Return cached data |
# | ||||||||||||
public
|
load_cache(array $data): void
Load cached data
Load cached data Parameters
|
# | ||||||||||||
public
|
connect(array $cfg): boolean
"connect" to a JMAP server by testing an auth request
"connect" to a JMAP server by testing an auth request Parameters
|
# | ||||||||||||
public
|
disconnect(): true
Fake a disconnect. JMAP is stateless so there is no disconnect
Fake a disconnect. JMAP is stateless so there is no disconnect |
# | ||||||||||||
public
|
authenticate(string $username, string $password, string $url): boolean
Attempt an auth to JMAP and record the session detail
Attempt an auth to JMAP and record the session detail Parameters
|
# | ||||||||||||
public
|
get_folder_list(): array
Fetch a list of all folders from JMAP
Fetch a list of all folders from JMAP |
# | ||||||||||||
public
|
get_namespaces(): array
Fake IMAP namespace support
Fake IMAP namespace support |
# | ||||||||||||
public
|
select_mailbox(string $mailbox): true
Fake selected a mailbox by getting it's current state
Fake selected a mailbox by getting it's current state Parameters
|
# | ||||||||||||
public
|
get_message_list(array $uids): array
Get a list of message headers for a set of uids
Get a list of message headers for a set of uids Parameters
|
# | ||||||||||||
public
|
get_message_structure(string $uid): array
Get the bodystructure of a message
Get the bodystructure of a message Parameters
|
# | ||||||||||||
public
|
get_message_content(string $uid, string $message_part, int $max = false, array $struct = false): string
Get a message part or the raw message if the part is 0
Get a message part or the raw message if the part is 0 Parameters
|
# | ||||||||||||
public
|
search(
string $target = 'ALL',
mixed $uids = false,
$terms = [],
$esearch = [],
bool $exclude_deleted = true,
bool $exclude_auto_bcc = true,
bool $only_auto_bcc = false,
): array
Search a field for a keyword
Search a field for a keyword Parameters
|
# | ||||||||||||
public
|
get_message_headers(string $uid, string $message_part = false, boolean $raw = false): array
Get the full headers for an E-mail
Get the full headers for an E-mail Parameters
|
# | ||||||||||||
public
|
message_action(string $action, $uids, string $mailbox = false, string $keyword = false): boolean
Move, Copy, delete, or set a keyword on an E-mail
Move, Copy, delete, or set a keyword on an E-mail Parameters
|
# | ||||||||||||
public
|
search_bodystructure(array $struct, array $search_flds, $all = true, $res = []): array
Search a bodystructure for a message part
Search a bodystructure for a message part Parameters
|
# | ||||||||||||
| Properties | |||
|---|---|---|---|
public
|
|
$selected_mailbox
|
# |
public
|
|
$folder_state = []
|
# |
public
|
|
$use_cache = true
|
# |
public
|
|
$read_only = false
|
# |
public
|
|
$server_type = 'JMAP'
|
# |