Public constructor
Parameters: |
|
---|---|
Throws ZendMailProtocolExceptionExceptionInterface: | |
Open connection to IMAP server
Parameters: |
|
---|---|
Throws ExceptionRuntimeException: | |
Return type: | string welcome message |
get the next line from socket with error checking, but nothing else
Return type: | string next line |
---|
get next line and assume it starts with $start. some requests give a simple feedback so we can quickly check if we can go on.
Parameters: | string – the first bytes we assume to be in the next line |
---|---|
Return type: | bool line starts with $start |
get next line and split the tag. that’s the normal case for a response line
Parameters: | string – tag of line is returned by reference |
---|---|
Return type: | string next line |
split a given line in tokens. a token is literal of any form or a list
Parameters: | string – line to decode |
---|---|
Return type: | array tokens, literals are returned as string, lists as array |
read a response “line” (could also be more than one real line if response has {..}<NL>) and do a simple decode
Parameters: |
|
---|---|
Return type: | bool if returned tag matches wanted tag |
read all lines of response until given tag is found (last line of response)
Parameters: |
|
---|---|
Return type: | null|bool|array tokens if success, false if error, null if bad request |
send a request
Parameters: |
|
---|---|
Throws ExceptionRuntimeException: | |
send a request and get response at once
Parameters: |
|
---|---|
Return type: | mixed response as in readResponse() |
escape one or more literals i.e. for sendRequest
Parameters: | string|array – the literal/-s |
---|---|
Return type: | string|array escape literals, literals with newline ar returned as array(‘{size}’, ‘string’); |
escape a list with literals or lists
Parameters: | array – list with literals or lists as PHP array |
---|---|
Return type: | string escaped list for imap |
Login to IMAP server.
Parameters: |
|
---|---|
Return type: | bool success |
logout of imap server
Return type: | bool success |
---|
Get capabilities from IMAP server
Return type: | array list of capabilities |
---|---|
Throws : | ZendMailProtocolExceptionExceptionInterface |
Examine and select have the same response. The common code for both is in this method
Parameters: |
|
---|---|
Return type: | bool|array false if error, array with returned information otherwise (flags, exists, recent, uidvalidity) |
Throws : | ZendMailProtocolExceptionExceptionInterface |
change folder
Parameters: | string – change to this folder |
---|---|
Return type: | bool|array see examineOrselect() |
Throws : | ZendMailProtocolExceptionExceptionInterface |
examine folder
Parameters: | string – examine this folder |
---|---|
Return type: | bool|array see examineOrselect() |
Throws : | ZendMailProtocolExceptionExceptionInterface |
fetch one or more items of one or more messages
Parameters: |
|
---|---|
Throws ExceptionRuntimeException: | |
Return type: | 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)) |
get mailbox list
this method can’t be named after the IMAP command ‘LIST’, as list is a reserved keyword
Parameters: |
|
---|---|
Return type: | array mailboxes that matched $mailbox as array(globalName => array(‘delim’ => .., ‘flags’ => ..)) |
Throws : | ZendMailProtocolExceptionExceptionInterface |
set flags
Parameters: |
|
---|---|
Return type: | bool|array new flags if $silent is false, else true or false depending on success |
Throws : | ZendMailProtocolExceptionExceptionInterface |
append a new message to given folder
Parameters: |
|
---|---|
Return type: | bool success |
Throws : | ZendMailProtocolExceptionExceptionInterface |
copy message set from current folder to other folder
Parameters: |
|
---|---|
Return type: | bool success |
create a new folder (and parent folders if needed)
Parameters: | string – folder name |
---|---|
Return type: | bool success |
rename an existing folder
Parameters: |
|
---|---|
Return type: | bool success |
remove a folder
Parameters: | string – folder name |
---|---|
Return type: | bool success |
permanently remove messages
Return type: | bool success |
---|
send noop
Return type: | bool success |
---|
do a search request
This method is currently marked as internal as the API might change and is not safe if you don’t take precautions.
Parameters: | array – |
---|---|
Return type: | array message ids |