Class Pop3

Summary

Fully Qualified Name: Zend\Mail\Protocol\Pop3

Description

Methods

Name Description Defined By
__construct() Public constructor Pop3
__destruct() Public destructor Pop3
capa() Get capabilities from POP3 server Pop3
connect() Open connection to POP3 server Pop3
delete() Make a DELE count to remove a message Pop3
getList() Make LIST call for size of message(s) Pop3
login() Login to POP3 server. Can use APOP Pop3
logout() End communication with POP3 server (also closes socket) Pop3
noop() Make a NOOP call, maybe needed for keeping the server happy Pop3
readResponse() read a response Pop3
request() Send request and get response Pop3
retrieve() Make a RETR call for retrieving a full message with headers and body Pop3
sendRequest() Send a request Pop3
status() Make STAT call for message count and size sum Pop3
top() 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 Pop3
undelete() Make RSET call, which rollbacks delete requests Pop3
uniqueid() Make UIDL call for getting a uniqueid Pop3

Method Details

__construct()

Public constructor

Parameter Name Type Description
$host string hostname
$port int|null port
$ssl bool|string use

Returns:

__destruct()

Public destructor

Returns:

capa()

Get capabilities from POP3 server

Returns: array list of capabilities

connect()

Open connection to POP3 server

Parameter Name Type Description
$host string hostname
$port int|null of
$ssl string|bool use

Returns: string welcome message

delete()

Make a DELE count to remove a message

Parameter Name Type Description
$msgno
$msgno

Returns:

getList()

Make LIST call for size of message(s)

Parameter Name Type Description
$msgno int|null number

Returns: int|array size of given message or list with array(num => size)

login()

Login to POP3 server. Can use APOP

Parameter Name Type Description
$user string username
$password string password
$tryApop bool should

Returns:

logout()

End communication with POP3 server (also closes socket)

Returns:

noop()

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

Returns:

readResponse()

read a response

Parameter Name Type Description
$multiline bool response

Returns: string response

request()

Send request and get response

Parameter Name Type Description
$request string request
$multiline bool multiline

Returns: string result from readResponse()

retrieve()

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

Parameter Name Type Description
$msgno int message

Returns: string message

sendRequest()

Send a request

Parameter Name Type Description
$request string your

Returns:

status()

Make STAT call for message count and size sum

Parameter Name Type Description
$messages int out
$octets int out

Returns:

top()

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 normal RETR call, which retrieves the whole message. Additional lines are not removed.

Parameter Name Type Description
$msgno int number
$lines int number
$fallback bool fallback

Returns: string message headers with wanted body lines

undelete()

Make RSET call, which rollbacks delete requests

Returns:

uniqueid()

Make UIDL call for getting a uniqueid

Parameter Name Type Description
$msgno int|null number

Returns: string|array uniqueid of message or list with array(num => uniqueid)

Top