.. Mail/Protocol/Imap.php generated using docpx on 01/30/13 03:26pm Class ***** Zend\\Mail\\Protocol\\Imap ========================== Methods ------- __construct +++++++++++ .. function:: __construct() Public constructor :param string: hostname or IP address of IMAP server, if given connect() is called :param int|null: port of IMAP server, null for default (143 or 993 for ssl) :param bool: use ssl? 'SSL', 'TLS' or false :throws \Zend\Mail\Protocol\Exception\ExceptionInterface: __destruct ++++++++++ .. function:: __destruct() Public destructor connect +++++++ .. function:: connect() Open connection to IMAP server :param string: hostname or IP address of IMAP server :param int|null: of IMAP server, default is 143 (993 for ssl) :param string|bool: use 'SSL', 'TLS' or false :throws Exception\RuntimeException: :rtype: string welcome message _nextLine +++++++++ .. function:: _nextLine() get the next line from socket with error checking, but nothing else :rtype: string next line _assumedNextLine ++++++++++++++++ .. function:: _assumedNextLine() 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. :param string: the first bytes we assume to be in the next line :rtype: bool line starts with $start _nextTaggedLine +++++++++++++++ .. function:: _nextTaggedLine() get next line and split the tag. that's the normal case for a response line :param string: tag of line is returned by reference :rtype: string next line _decodeLine +++++++++++ .. function:: _decodeLine() split a given line in tokens. a token is literal of any form or a list :param string: line to decode :rtype: array tokens, literals are returned as string, lists as array readLine ++++++++ .. function:: readLine() read a response "line" (could also be more than one real line if response has {..}) and do a simple decode :param array|string: decoded tokens are returned by reference, if $dontParse is true the unparsed line is returned here :param string: check for this tag for response code. Default '*' is continuation tag. :param bool: if true only the unparsed line is returned $tokens :rtype: bool if returned tag matches wanted tag readResponse ++++++++++++ .. function:: readResponse() read all lines of response until given tag is found (last line of response) :param string: the tag of your request :param bool: if true every line is returned unparsed instead of the decoded tokens :rtype: null|bool|array tokens if success, false if error, null if bad request sendRequest +++++++++++ .. function:: sendRequest() send a request :param string: your request command :param array: additional parameters to command, use escapeString() to prepare :param string: provide a tag otherwise an autogenerated is returned :throws Exception\RuntimeException: requestAndResponse ++++++++++++++++++ .. function:: requestAndResponse() send a request and get response at once :param string: command as in sendRequest() :param array: parameters as in sendRequest() :param bool: if true unparsed lines are returned instead of tokens :rtype: mixed response as in readResponse() escapeString ++++++++++++ .. function:: escapeString() escape one or more literals i.e. for sendRequest :param string|array: the literal/-s :rtype: string|array escape literals, literals with newline ar returned as array('{size}', 'string'); escapeList ++++++++++ .. function:: escapeList() escape a list with literals or lists :param array: list with literals or lists as PHP array :rtype: string escaped list for imap login +++++ .. function:: login() Login to IMAP server. :param string: username :param string: password :rtype: bool success logout ++++++ .. function:: logout() logout of imap server :rtype: bool success capability ++++++++++ .. function:: capability() Get capabilities from IMAP server :rtype: array list of capabilities :throws: \Zend\Mail\Protocol\Exception\ExceptionInterface examineOrSelect +++++++++++++++ .. function:: examineOrSelect() Examine and select have the same response. The common code for both is in this method :param string: can be 'EXAMINE' or 'SELECT' and this is used as command :param string: which folder to change to or examine :rtype: bool|array false if error, array with returned information otherwise (flags, exists, recent, uidvalidity) :throws: \Zend\Mail\Protocol\Exception\ExceptionInterface select ++++++ .. function:: select() change folder :param string: change to this folder :rtype: bool|array see examineOrselect() :throws: \Zend\Mail\Protocol\Exception\ExceptionInterface examine +++++++ .. function:: examine() examine folder :param string: examine this folder :rtype: bool|array see examineOrselect() :throws: \Zend\Mail\Protocol\Exception\ExceptionInterface fetch +++++ .. function:: fetch() fetch one or more items of one or more messages :param string|array: items to fetch from message(s) as string (if only one item) or array of strings :param int|array: message for items or start message if $to !== null :param int|null: if null only one message ($from) is fetched, else it's the last message, INF means last message available :throws Exception\RuntimeException: :rtype: 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 +++++++++++ .. function:: listMailbox() get mailbox list this method can't be named after the IMAP command 'LIST', as list is a reserved keyword :param string: mailbox reference for list :param string: mailbox name match with wildcards :rtype: array mailboxes that matched $mailbox as array(globalName => array('delim' => .., 'flags' => ..)) :throws: \Zend\Mail\Protocol\Exception\ExceptionInterface store +++++ .. function:: store() set flags :param array: flags to set, add or remove - see $mode :param int: message for items or start message if $to !== null :param int|null: if null only one message ($from) is fetched, else it's the last message, INF means last message available :param string|null: '+' to add flags, '-' to remove flags, everything else sets the flags as given :param bool: if false the return values are the new flags for the wanted messages :rtype: bool|array new flags if $silent is false, else true or false depending on success :throws: \Zend\Mail\Protocol\Exception\ExceptionInterface append ++++++ .. function:: append() append a new message to given folder :param string: name of target folder :param string: full message content :param array: flags for new message :param string: date for new message :rtype: bool success :throws: \Zend\Mail\Protocol\Exception\ExceptionInterface copy ++++ .. function:: copy() copy message set from current folder to other folder :param string: destination folder :param $from: :param int|null: if null only one message ($from) is fetched, else it's the last message, INF means last message available :rtype: bool success create ++++++ .. function:: create() create a new folder (and parent folders if needed) :param string: folder name :rtype: bool success rename ++++++ .. function:: rename() rename an existing folder :param string: old name :param string: new name :rtype: bool success delete ++++++ .. function:: delete() remove a folder :param string: folder name :rtype: bool success expunge +++++++ .. function:: expunge() permanently remove messages :rtype: bool success noop ++++ .. function:: noop() send noop :rtype: bool success search ++++++ .. function:: search() 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. :param array: :rtype: array message ids Constants --------- TIMEOUT_CONNECTION ++++++++++++++++++ Default timeout in seconds for initiating session