Class Zend_Mail_Transport_Imap

Description

Located in /Zend/Mail/Transport/Imap.php (line 35)


	
			
Method Summary
Zend_Mail_Transport_Imap __construct ([string $host = ''], [int $port = null], [bool $ssl = false])
void __destruct ()
array capability ()
string connect (string $host, [int $port = null], [string $ssl = false])
void escapeList ( $list)
string|array escapeString ( $string)
bool|array examine ([ $box = 'INBOX'])
bool|array examineOrSelect ([ $command = 'EXAMINE'], [ $box = 'INBOX'])
void fetch ( $items,  $from, [ $to = null])
bool login (string $user, string $password)
bool logout ()
bool readLine ([ &$tokens = array()], [ $wantedTag = '*'])
null|bool|array readResponse ( $tag, [ $filter = ''])
mixed requestAndResponse ( $command, [ $tokens = array()])
bool|array select ([ $box = 'INBOX'])
void sendRequest ( $command, [ $tokens = array()], [ &$tag = null])
Methods
Constructor __construct (line 50)

Public constructor

Zend_Mail_Transport_Imap __construct ([string $host = ''], [int $port = null], [bool $ssl = false])
  • string $host: hostname of IP address of IMAP server, if given connect() is called
  • int $port: port of IMAP server, default is 143 (993 for ssl)
  • bool $ssl: use ssl?
Destructor __destruct (line 60)

Public destructor

  • access: public
void __destruct ()
capability (line 342)

Get capabilities from IMAP server

  • return: list of capabilities
  • access: public
array capability ()
connect (line 74)

Open connection to POP3 server

  • return: welcome message
  • access: public
  • throws: Zend_Mail_Transport_Exception
string connect (string $host, [int $port = null], [string $ssl = false])
  • string $host: hostname of IP address of POP3 server
  • int $port: of IMAP server, default is 143 (993 for ssl)
  • string $ssl: use 'SSL' or 'TLS'
escapeList (line 290)
  • access: public
void escapeList ( $list)
  • $list
escapeString (line 274)

escape one or more literals i.e. for sendRequest

  • return: escape literals, literals with newline ar returned as array('{size}', 'string');
  • access: public
string|array escapeString ( $string)
  • $string
examine (line 414)

examine folder

  • return: see examineOrselect()
  • access: public
bool|array examine ([ $box = 'INBOX'])
  • $box
examineOrSelect (line 367)

Examine and select have the same response. The common code for both is in this method

  • return: false if error, array with returned information otherwise (flags, exists, recent, uidvalidity)
  • access: public
bool|array examineOrSelect ([ $command = 'EXAMINE'], [ $box = 'INBOX'])
  • $command
  • $box
fetch (line 419)
  • access: public
void fetch ( $items,  $from, [ $to = null])
  • $items
  • $from
  • $to
login (line 311)

Login to IMAP server.

  • return: success
  • access: public
bool login (string $user, string $password)
  • string $user: username
  • string $password: password
logout (line 321)

logout of imap server

  • return: success
  • access: public
bool logout ()
readLine (line 111)

read a response "line" (could also be more than one real line if response has {..}<NL>) and do a simple decode

  • return: if returned tag matches wanted tag
  • access: public
bool readLine ([ &$tokens = array()], [ $wantedTag = '*'])
  • &$tokens
  • $wantedTag
readResponse (line 192)

read all lines of response until given tag is found (last line of response)

  • return: tokens if success, false if error, null if bad request
  • access: public
null|bool|array readResponse ( $tag, [ $filter = ''])
  • $tag
  • $filter
requestAndResponse (line 260)

send a request and get response at once

  • return: response as in readResponse()
  • access: public
mixed requestAndResponse ( $command, [ $tokens = array()])
  • $command
  • $tokens
select (line 403)

change folder

  • return: see examineOrselect()
  • access: public
bool|array select ([ $box = 'INBOX'])
  • $box
sendRequest (line 230)

send a request

  • access: public
  • throws: Zend_Mail_Transport_Exception
void sendRequest ( $command, [ $tokens = array()], [ &$tag = null])
  • $command
  • $tokens
  • &$tag

Documentation generated on Sun, 29 Oct 2006 21:27:57 -0600 by phpDocumentor 1.3.0RC6