Class Zend_Mail_Protocol_Pop3

Description

Located in /Zend/Mail/Protocol/Pop3.php (line 31)


	
			
Variable Summary
 null|bool $hasTop
 null|resource $_socket
 null|string $_timestamp
Method Summary
 Zend_Mail_Protocol_Pop3 __construct ([string $host = ''], [int|null $port = null], [bool|string $ssl = false])
 void __destruct ()
 array capa ()
 string connect (string $host, [int|null $port = null], [string|bool $ssl = false])
 null delete ( $msgno)
 int|array getList ([int|null $msgno = null])
 void login (string $user, string $password, [ $tryApop = true], bool $try_apop)
 null logout ()
 null noop ()
 string readResponse ([boolean $multiline = false])
 string request (string $request, [bool $multiline = false])
 string retrive (int $msgno)
 null sendRequest (string $request)
 void status ( &$messages,  &$octets, int $messages, int $octets)
 string top (int $msgno, [int $lines = 0], [bool $fallback = false])
 null undelete ()
 string|array uniqueid ([int|null $msgno = null])
Variables
null|bool $hasTop = null (line 37)

saves if server supports top

  • access: public
null|resource $_socket (line 43)

socket to pop3

  • access: protected
null|string $_timestamp (line 49)

greeting timestamp for apop

  • access: protected
Methods
Constructor __construct (line 60)

Public constructor

  • access: public
  • throws: Zend_Mail_Protocol_Exception
Zend_Mail_Protocol_Pop3 __construct ([string $host = ''], [int|null $port = null], [bool|string $ssl = false])
  • string $host: hostname of IP address of POP3 server, if given connect() is called
  • int|null $port: port of POP3 server, null for default (110 or 995 for ssl)
  • bool|string $ssl: use ssl? 'SSL', 'TLS' or false
Destructor __destruct (line 71)

Public destructor

  • access: public
void __destruct ()
capa (line 223)

Get capabilities from POP3 server

  • return: list of capabilities
  • access: public
  • throws: Zend_Mail_Protocol_Exception
array capa ()
connect (line 86)

Open connection to POP3 server

  • return: welcome message
  • access: public
  • throws: Zend_Mail_Protocol_Exception
string connect (string $host, [int|null $port = null], [string|bool $ssl = false])
  • string $host: hostname of IP address of POP3 server
  • int|null $port: of POP3 server, default is 110 (995 for ssl)
  • string|bool $ssl: use 'SSL', 'TLS' or false
delete (line 412)

Make a DELE count to remove a message

  • access: public
  • throws: Zend_Mail_Protocol_Exception
null delete ( $msgno)
  • $msgno
getList (line 280)

Make LIST call for size of message(s)

  • return: size of given message or list with array(num => size)
  • access: public
  • throws: Zend_Mail_Protocol_Exception
int|array getList ([int|null $msgno = null])
  • int|null $msgno: number of message, null for all
login (line 239)

Login to POP3 server. Can use APOP

  • access: public
  • throws: Zend_Mail_Protocol_Exception
void login (string $user, string $password, [ $tryApop = true], bool $try_apop)
  • string $user: username
  • string $password: password
  • bool $try_apop: should APOP be tried?
  • $tryApop
logout (line 200)

End communication with POP3 server (also closes socket)

  • access: public
null logout ()
noop (line 400)

Make a NOOP call, maybe needed for keeping the server happy

  • access: public
  • throws: Zend_Mail_Protocol_Exception
null noop ()
readResponse (line 146)

read a response

  • return: response
  • access: public
  • throws: Zend_Mail_Protocol_Exception
string readResponse ([boolean $multiline = false])
  • boolean $multiline: response has multiple lines and should be read until "<nl>.<nl>"
request (line 188)

Send request and get resposne

string request (string $request, [bool $multiline = false])
  • string $request: request
  • bool $multiline: multiline response?
retrive (line 387)

Make a RETR call for retrieving a full message with headers and body

  • return: message
  • access: public
  • throws: Zend_Mail_Protocol_Exception
string retrive (int $msgno)
  • int $msgno: message number
sendRequest (line 130)

Send a request

  • access: public
  • throws: Zend_Mail_Protocol_Exception
null sendRequest (string $request)
  • string $request: your request without newline
status (line 263)

Make STAT call for message count and size sum

  • access: public
  • throws: Zend_Mail_Protocol_Exception
void status ( &$messages,  &$octets, int $messages, int $octets)
  • int $messages: out parameter with count of messages
  • int $octets: out parameter with size in octects of messages
  • &$messages
  • &$octets
top (line 348)

Make TOP call for getting headers and maybe some body lines This method also sets hasTop - before it it's not known if top is supported

The fallback makes normale RETR call, which retrieves the whole message. Additional lines are not removed.

  • return: message headers with wanted body lines
  • access: public
  • throws: Zend_Mail_Protocol_Exception
string top (int $msgno, int $lines, [bool $fallback = false])
  • int $msgno: number of message
  • int $lines: number of wanted body lines (empty line is inserted after header lines)
  • bool $fallback: fallback with full retrieve if top is not supported
undelete (line 424)

Make RSET call, which rollbacks delete requests

  • access: public
  • throws: Zend_Mail_Protocol_Exception
null undelete ()
uniqueid (line 309)

Make UIDL call for getting a uniqueid

  • return: uniqueid of message or list with array(num => uniqueid)
  • access: public
  • throws: Zend_Mail_Protocol_Exception
string|array uniqueid ([int|null $msgno = null])
  • int|null $msgno: number of message, null for all

Documentation generated on Wed, 21 Feb 2007 11:57:37 -0800 by phpDocumentor 1.3.1