\POP3

PHPMailer POP-Before-SMTP Authentication Class.

Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. Does not support APOP.

Summary

Methods
Properties
Constants
__construct()
popBeforeSmtp()
authorise()
connect()
login()
disconnect()
$Version
$POP3_PORT
$POP3_TIMEOUT
$CRLF
$do_debug
$host
$port
$tval
$username
$password
CRLF
No protected methods found
No protected properties found
N/A
getResponse()
sendString()
checkResponse()
displayErrors()
catchWarning()
$pop_conn
$connected
$error
N/A

Constants

CRLF

CRLF = "\r\n"

Line break constant

Properties

$Version

$Version : 

The POP3 PHPMailer Version number.

Type

$POP3_PORT

$POP3_PORT : 

Default POP3 port number.

Type

$POP3_TIMEOUT

$POP3_TIMEOUT : 

Default timeout in seconds.

Type

$CRLF

$CRLF : 

POP3 Carriage Return + Line Feed.

Type

$do_debug

$do_debug : 

Debug display level.

Options: 0 = no, 1+ = yes

Type

$host

$host : 

POP3 mail server hostname.

Type

$port

$port : 

POP3 port number.

Type

$tval

$tval : 

POP3 Timeout Value in seconds.

Type

$username

$username : 

POP3 username

Type

$password

$password : 

POP3 password.

Type

$pop_conn

$pop_conn : 

Resource handle for the POP3 connection socket.

Type

$connected

$connected : 

Are we connected?

Type

$error

$error : 

Error container.

Type

Methods

__construct()

__construct() 

Constructor.

popBeforeSmtp()

popBeforeSmtp(  $host, boolean  $port = false, boolean  $tval = false, string  $username = '', string  $password = '', integer  $debug_level) : boolean

Simple static wrapper for all-in-one POP before SMTP

Parameters

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

Returns

boolean

authorise()

authorise(string  $host, boolean|integer  $port = false, boolean|integer  $tval = false, string  $username = '', string  $password = '', integer  $debug_level) : boolean

Authenticate with a POP3 server.

A connect, login, disconnect sequence appropriate for POP-before SMTP authorisation.

Parameters

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

Returns

boolean

connect()

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

Connect to a POP3 server.

Parameters

string $host
boolean|integer $port
integer $tval

Returns

boolean

login()

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

Log in to the POP3 server.

Does not support APOP (RFC 2828, 4949).

Parameters

string $username
string $password

Returns

boolean

disconnect()

disconnect() 

Disconnect from the POP3 server.

getResponse()

getResponse(integer  $size = 128) : string

Get a response from the POP3 server.

$size is the maximum number of bytes to retrieve

Parameters

integer $size

Returns

string

sendString()

sendString(string  $string) : integer

Send raw data to the POP3 server.

Parameters

string $string

Returns

integer

checkResponse()

checkResponse(string  $string) : boolean

Checks the POP3 server response.

Looks for for +OK or -ERR.

Parameters

string $string

Returns

boolean

displayErrors()

displayErrors() 

Display errors if debug is enabled.

catchWarning()

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

POP3 connection error handler.

Parameters

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