Properties

$POP3_PORT

$POP3_PORT : integer

Default POP3 port

Type

integer

$POP3_TIMEOUT

$POP3_TIMEOUT : integer

Default Timeout

Type

integer

$CRLF

$CRLF : string

POP3 Carriage Return + Line Feed

Type

string

$do_debug

$do_debug : integer

Displaying Debug warnings? (0 = now, 1+ = yes)

Type

integer

$host

$host : string

POP3 Mail Server

Type

string

$port

$port : integer

POP3 Port

Type

integer

$tval

$tval : integer

POP3 Timeout Value

Type

integer

$username

$username : string

POP3 Username

Type

string

$password

$password : string

POP3 Password

Type

string

$pop_conn

$pop_conn : 

Type

$connected

$connected : 

Type

$error

$error : 

Type

Methods

__construct()

__construct() : \SlightPHP\POP3

Constructor, sets the initial values

Returns

\SlightPHP\POP3

Authorise()

Authorise(string  $host, integer  $port = false, integer  $tval = false, string  $username, string  $password,   $debug_level) 

Combination of public events - connect, login, disconnect

Parameters

string $host
integer $port
integer $tval
string $username
string $password
$debug_level

Connect()

Connect(string  $host, integer  $port = false, integer  $tval = 30) : boolean

Connect to the POP3 server

Parameters

string $host
integer $port
integer $tval

Returns

boolean

Login()

Login(string  $username = '', string  $password = '') : boolean

Login to the POP3 server (does not support APOP yet)

Parameters

string $username
string $password

Returns

boolean

Disconnect()

Disconnect() 

Disconnect from the POP3 server

getResponse()

getResponse(integer  $size = 128) : string

Get the socket response back.

$size is the maximum number of bytes to retrieve

Parameters

integer $size

Returns

string

sendString()

sendString(string  $string) : integer

Send a string down the open socket connection to the POP3 server

Parameters

string $string

Returns

integer

checkResponse()

checkResponse(string  $string) : boolean

Checks the POP3 server response for +OK or -ERR

Parameters

string $string

Returns

boolean

displayErrors()

displayErrors() 

If debug is enabled, display the error message array

catchWarning()

catchWarning(integer  $errno, string  $errstr, string  $errfile, integer  $errline) 

Takes over from PHP for the socket warning handler

Parameters

integer $errno
string $errstr
string $errfile
integer $errline