Public Member Functions | Data Fields | Protected Attributes

Zend_Mail_Protocol_Pop3 Class Reference

Public Member Functions

 __construct ($host= '', $port=null, $ssl=false)
 __destruct ()
 connect ($host, $port=null, $ssl=false)
 sendRequest ($request)
 readResponse ($multiline=false)
 request ($request, $multiline=false)
 logout ()
 capa ()
 login ($user, $password, $tryApop=true)
 status (&$messages, &$octets)
 getList ($msgno=null)
 uniqueid ($msgno=null)
 top ($msgno, $lines=0, $fallback=false)
 retrive ($msgno)
 retrieve ($msgno)
 noop ()
 delete ($msgno)
 undelete ()

Data Fields

const TIMEOUT_CONNECTION = 30
 $hasTop = null

Protected Attributes

 $_socket
 $_timestamp

Detailed Description

Definition at line 31 of file Pop3.php.


Constructor & Destructor Documentation

__construct ( host = '',
port = null,
ssl = false 
)

Public constructor

Parameters:
string$hosthostname or IP address of POP3 server, if given connect() is called
int | null$portport of POP3 server, null for default (110 or 995 for ssl)
bool | string$ssluse ssl? 'SSL', 'TLS' or false
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 65 of file Pop3.php.

__destruct (  )

Public destructor

Definition at line 76 of file Pop3.php.


Member Function Documentation

capa (  )

Get capabilities from POP3 server

Returns:
array list of capabilities
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 254 of file Pop3.php.

connect ( host,
port = null,
ssl = false 
)

Open connection to POP3 server

Parameters:
string$hosthostname or IP address of POP3 server
int | null$portof POP3 server, default is 110 (995 for ssl)
string | bool$ssluse 'SSL', 'TLS' or false
Returns:
string welcome message
Exceptions:
Zend_Mail_Protocol_Exception

See also:
Zend_Mail_Protocol_Exception
Zend_Mail_Protocol_Exception

Definition at line 91 of file Pop3.php.

delete ( msgno )

Make a DELE count to remove a message

Returns:
null
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 456 of file Pop3.php.

getList ( msgno = null )

Make LIST call for size of message(s)

Parameters:
int | null$msgnonumber of message, null for all
Returns:
int|array size of given message or list with array(num => size)
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 311 of file Pop3.php.

login ( user,
password,
tryApop = true 
)

Login to POP3 server. Can use APOP

Parameters:
string$userusername
string$passwordpassword
bool$try_apopshould APOP be tried?
Returns:
void
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 270 of file Pop3.php.

logout (  )

End communication with POP3 server (also closes socket)

Returns:
null

Definition at line 231 of file Pop3.php.

noop (  )

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

Returns:
null
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 444 of file Pop3.php.

readResponse ( multiline = false )

read a response

Parameters:
boolean$multilineresponse has multiple lines and should be read until "<nl>.<nl>"
Returns:
string response
Exceptions:
Zend_Mail_Protocol_Exception

See also:
Zend_Mail_Protocol_Exception
Zend_Mail_Protocol_Exception

Definition at line 166 of file Pop3.php.

request ( request,
multiline = false 
)

Send request and get resposne

See also:
sendRequest(), readResponse()
Parameters:
string$requestrequest
bool$multilinemultiline response?
Returns:
string result from readResponse()
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 219 of file Pop3.php.

retrieve ( msgno )

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

Parameters:
int$msgnomessage number
Returns:
string message
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 432 of file Pop3.php.

retrive ( msgno )

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

Deprecated:
since 1.1.0; this method has a typo - please use retrieve()
Parameters:
int$msgnomessage number
Returns:
string message
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 419 of file Pop3.php.

sendRequest ( request )

Send a request

Parameters:
string$requestyour request without newline
Returns:
null
Exceptions:
Zend_Mail_Protocol_Exception

See also:
Zend_Mail_Protocol_Exception

Definition at line 146 of file Pop3.php.

status ( &$  messages,
&$  octets 
)

Make STAT call for message count and size sum

Parameters:
int$messagesout parameter with count of messages
int$octetsout parameter with size in octects of messages
Returns:
void
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 294 of file Pop3.php.

top ( msgno,
lines = 0,
fallback = false 
)

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.

Parameters:
int$msgnonumber of message
int$linesnumber of wanted body lines (empty line is inserted after header lines)
bool$fallbackfallback with full retrieve if top is not supported
Returns:
string message headers with wanted body lines
Exceptions:
Zend_Mail_Protocol_Exception

See also:
Zend_Mail_Protocol_Exception

Definition at line 379 of file Pop3.php.

undelete (  )

Make RSET call, which rollbacks delete requests

Returns:
null
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 468 of file Pop3.php.

uniqueid ( msgno = null )

Make UIDL call for getting a uniqueid

Parameters:
int | null$msgnonumber of message, null for all
Returns:
string|array uniqueid of message or list with array(num => uniqueid)
Exceptions:
Zend_Mail_Protocol_Exception

Definition at line 340 of file Pop3.php.


Field Documentation

const TIMEOUT_CONNECTION = 30

Default timeout in seconds for initiating session

Definition at line 36 of file Pop3.php.


The documentation for this class was generated from the following file: