__construct()
__destruct()
append()
capability()
connect()
copy()
create()
delete()
escapeList()
escapeString()
examine()
examineOrSelect()
expunge()
fetch()
listMailbox()
login()
logout()
noop()
readLine()
readResponse()
rename()
requestAndResponse()
search()
select()
sendRequest()
store()
subscribe()
_assumedNextLine()
_decodeLine()
_nextLine()
_nextTaggedLine()
$socket
$tagCount
TIMEOUT_CONNECTION
__construct(string $host, int | null $port, bool $ssl)
string
hostname or IP address of IMAP server, if given connect() is called
intnull
port of IMAP server, null for default (143 or 993 for ssl)
bool
use ssl? 'SSL', 'TLS' or false
\Zend\Mail\Protocol\Exception\ExceptionInterface |
---|
__destruct()
append(string $folder, string $message, array $flags, string $date) : bool
string
name of target folder
string
full message content
array
flags for new message
string
date for new message
\Zend\Mail\Protocol\Exception\ExceptionInterface |
---|
bool
successcapability() : array
connect(string $host, int | null $port, string | bool $ssl) : string
string
hostname or IP address of IMAP server
intnull
of IMAP server, default is 143 (993 for ssl)
stringbool
use 'SSL', 'TLS' or false
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
string
welcome messagecopy(string $folder, $from, int | null $to) : bool
string
destination folder
intnull
if null only one message ($from) is fetched, else it's the last message, INF means last message available
bool
successcreate(string $folder) : bool
string
folder name
bool
successdelete(string $folder) : bool
string
folder name
bool
successescapeList(array $list) : string
array
list with literals or lists as PHP array
string
escaped list for imapescapeString(string | array $string) : string | array
for sendRequest
stringarray
the literal/-s
string
array
escape literals, literals with newline ar returned as array('{size}', 'string');examine(string $box) : bool | array
string
examine this folder
\Zend\Mail\Protocol\Exception\ExceptionInterface |
---|
bool
array
see examineOrselect()examineOrSelect(string $command, string $box) : bool | array
The common code for both is in this method
string
can be 'EXAMINE' or 'SELECT' and this is used as command
string
which folder to change to or examine
\Zend\Mail\Protocol\Exception\ExceptionInterface |
---|
bool
array
false if error, array with returned information otherwise (flags, exists, recent, uidvalidity)expunge() : bool
bool
successfetch(string | array $items, int | array $from, int | null $to) : string | array
stringarray
items to fetch from message(s) as string (if only one item) or array of strings
intarray
message for items or start message if $to !== null
intnull
if null only one message ($from) is fetched, else it's the last message, INF means last message available
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
string
array
if only one item of one message is fetched it's returned as string if items of one message are fetched it's returned as (name => value) if one items of messages are fetched it's returned as (msgno => value) if items of messages are fetched it's returned as (msgno => (name => value))listMailbox(string $reference, string $mailbox) : array
this method can't be named after the IMAP command 'LIST', as list is a reserved keyword
string
mailbox reference for list
string
mailbox name match with wildcards
\Zend\Mail\Protocol\Exception\ExceptionInterface |
---|
array
mailboxes that matched $mailbox as array(globalName => array('delim' => .., 'flags' => ..))login(string $user, string $password) : bool
string
username
string
password
bool
successlogout() : bool
bool
successnoop() : bool
bool
successreadLine(array | string $tokens, string $wantedTag, bool $dontParse) : bool
.}
arraystring
decoded tokens are returned by reference, if $dontParse is true the unparsed line is returned here
string
check for this tag for response code. Default '*' is continuation tag.
bool
if true only the unparsed line is returned $tokens
bool
if returned tag matches wanted tagreadResponse(string $tag, bool $dontParse) : null | bool | array
string
the tag of your request
bool
if true every line is returned unparsed instead of the decoded tokens
null
bool
array
tokens if success, false if error, null if bad requestrename(string $old, string $new) : bool
string
old name
string
new name
bool
successrequestAndResponse(string $command, array $tokens, bool $dontParse) : mixed
string
command as in sendRequest()
array
parameters as in sendRequest()
bool
if true unparsed lines are returned instead of tokens
mixed
response as in readResponse()search(array $params) : array
This method is currently marked as internal as the API might change and is not safe if you don't take precautions.
array
array
message idsselect(string $box) : bool | array
string
change to this folder
\Zend\Mail\Protocol\Exception\ExceptionInterface |
---|
bool
array
see examineOrselect()sendRequest(string $command, array $tokens, string $tag)
string
your request command
array
additional parameters to command, use escapeString() to prepare
string
provide a tag otherwise an autogenerated is returned
\Zend\Mail\Protocol\Exception\RuntimeException |
---|
store(array $flags, int $from, int | null $to, string | null $mode, bool $silent) : bool | array
array
flags to set, add or remove - see $mode
int
message for items or start message if $to !== null
intnull
if null only one message ($from) is fetched, else it's the last message, INF means last message available
stringnull
'+' to add flags, '-' to remove flags, everything else sets the flags as given
bool
if false the return values are the new flags for the wanted messages
\Zend\Mail\Protocol\Exception\ExceptionInterface |
---|
bool
array
new flags if $silent is false, else true or false depending on successsubscribe(string $folder) : bool
string
folder name
bool
success_assumedNextLine(string $start) : bool
some requests give a simple feedback so we can quickly check if we can go on.
string
the first bytes we assume to be in the next line
bool
line starts with $start_decodeLine(string $line) : array
a token is literal of any form or a list
string
line to decode
array
tokens, literals are returned as string, lists as array_nextLine() : string
_nextTaggedLine(string $tag) : string
that's the normal case for a response line
string
tag of line is returned by reference
string
next line$socket : resource | null
$tagCount : int
TIMEOUT_CONNECTION