category | Zend |
---|---|
package | Zend_Mail |
subpackage | Protocol |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct(string $host= ''
, integer|null $port= null
, boolean $ssl= false
)
string
hostname or IP address of IMAP server, if given connect() is called
integer
null
port of IMAP server, null for default (143 or 993 for ssl)
boolean
use ssl? 'SSL', 'TLS' or false
\Zend_Mail_Protocol_Exception |
---|
__destruct()
append(string $folder, string $message, array $flags= null
, string $date= null
) : boolean
string
name of target folder
string
full message content
array
flags for new message
string
date for new message
\Zend_Mail_Protocol_Exception |
---|
boolean
successcapability() : array
\Zend_Mail_Protocol_Exception |
---|
array
list of capabilitiesconnect(string $host, integer|null $port= null
, string|boolean $ssl= false
) : string
string
hostname or IP address of IMAP server
integer
null
of IMAP server, default is 143 (993 for ssl)
string
boolean
use 'SSL', 'TLS' or false
\Zend_Mail_Protocol_Exception |
---|
string
welcome messagecopy(string $folder, $from, integer|null $to = null
) : boolean
string
destination folder
integer
null
if null only one message ($from) is fetched, else it's the last message, INF means last message avaible
\Zend_Mail_Protocol_Exception |
---|
boolean
successcreate(string $folder) : boolean
string
folder name
boolean
successdelete(string $folder) : boolean
string
folder name
boolean
successescapeList(array $list) : string
array
list with literals or lists as PHP array
string
escaped list for imapescapeString(string|array $string) : string | array
string
array
the literal/-s
string
array
escape literals, literals with newline ar returned
as array('{size}', 'string');examine(string $box = 'INBOX'
) : boolean | array
string
examine this folder
\Zend_Mail_Protocol_Exception |
---|
boolean
array
see examineOrselect()examineOrSelect(string $command= 'EXAMINE'
, string $box= 'INBOX'
) : boolean | array
string
can be 'EXAMINE' or 'SELECT' and this is used as command
string
which folder to change to or examine
\Zend_Mail_Protocol_Exception |
---|
boolean
array
false if error, array with returned information
otherwise (flags, exists, recent, uidvalidity)expunge() : boolean
boolean
successfetch(string|array $items, integer $from, integer|null $to = null
) : string | array
string
array
items to fetch from message(s) as string (if only one item) or array of strings
integer
message for items or start message if $to !== null
integer
null
if null only one message ($from) is fetched, else it's the last message, INF means last message avaible
\Zend_Mail_Protocol_Exception |
---|
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 fetchted 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 |
---|
array
mailboxes that matched $mailbox as array(globalName => array('delim' => .., 'flags' => ..))login(string $user, string $password) : boolean
string
username
string
password
\Zend_Mail_Protocol_Exception |
---|
boolean
successlogout() : boolean
boolean
successnoop() : boolean
boolean
successreadLine(array|string $tokens= array()
, string $wantedTag= '*'
, boolean $dontParse= false
) : boolean
.}
array
string
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.
boolean
if true only the unparsed line is returned $tokens
\Zend_Mail_Protocol_Exception |
---|
boolean
if returned tag matches wanted tagreadResponse(string $tag, boolean $dontParse = false
) : null | boolean | array
string
the tag of your request
boolean
if true every line is returned unparsed instead of the decoded tokens
\Zend_Mail_Protocol_Exception |
---|
null
boolean
array
tokens if success, false if error, null if bad requestrename(string $old, string $new) : boolean
string
old name
string
new name
boolean
successrequestAndResponse(string $command, array $tokens= array()
, boolean $dontParse= false
) : mixed
string
command as in sendRequest()
array
parameters as in sendRequest()
boolean
if true unparsed lines are returned instead of tokens
\Zend_Mail_Protocol_Exception |
---|
mixed
response as in readResponse()select(string $box = 'INBOX'
) : boolean | array
string
change to this folder
\Zend_Mail_Protocol_Exception |
---|
boolean
array
see examineOrselect()sendRequest(string $command, array $tokens= array()
, string $tag= null
) : null
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 |
---|
null
store(array $flags, integer $from, integer|null $to= null
, string|null $mode= null
, boolean $silent= true
) : boolean | array
array
flags to set, add or remove - see $mode
integer
message for items or start message if $to !== null
integer
null
if null only one message ($from) is fetched, else it's the last message, INF means last message avaible
string
null
'+' to add flags, '-' to remove flags, everything else sets the flags as given
boolean
if false the return values are the new flags for the wanted messages
\Zend_Mail_Protocol_Exception |
---|
boolean
array
new flags if $silent is false, else true or false depending on success_assumedNextLine(string $start) : boolean
string
the first bytes we assume to be in the next line
\Zend_Mail_Protocol_Exception |
---|
boolean
line starts with $start_decodeLine(string $line) : array
string
line to decode
\Zend_Mail_Protocol_Exception |
---|
array
tokens, literals are returned as string, lists as array_nextLine() : string
\Zend_Mail_Protocol_Exception |
---|
string
next line_nextTaggedLine(string $tag) : string
string
tag of line is returned by reference
\Zend_Mail_Protocol_Exception |
---|
string
next line$_socket : resource | null
$_tagCount : integer
0
TIMEOUT_CONNECTION = 30