Public constructor
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
Public destructor
void
__destruct
()
Get capabilities from POP3 server
array
capa
()
Open connection to POP3 server
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
Make a DELE count to remove a message
null
delete
( $msgno)
Make LIST call for size of message(s)
int|array
getList
([int|null $msgno = null])
-
int|null
$msgno: number of message, null for all
Login to POP3 server. Can use APOP
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
End communication with POP3 server (also closes socket)
null
logout
()
Make a NOOP call, maybe needed for keeping the server happy
null
noop
()
read a response
string
readResponse
([boolean $multiline = false])
-
boolean
$multiline: response has multiple lines and should be read until "<nl>.<nl>"
Send request and get resposne
string
request
(string $request, [bool $multiline = false])
-
string
$request: request
-
bool
$multiline: multiline response?
Make a RETR call for retrieving a full message with headers and body
string
retrive
(int $msgno)
-
int
$msgno: message number
Send a request
null
sendRequest
(string $request)
-
string
$request: your request without newline
Make STAT call for message count and size sum
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
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.
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
Make RSET call, which rollbacks delete requests
null
undelete
()
Make UIDL call for getting a uniqueid
string|array
uniqueid
([int|null $msgno = null])
-
int|null
$msgno: number of message, null for all