PHPMailer POP-Before-SMTP Authentication Class. Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. Does not support APOP.
Methods | ||||||||
---|---|---|---|---|---|---|---|---|
public
static
|
popBeforeSmtp(
$host,
integer|boolean $port = false,
integer|boolean $timeout = false,
string $username = '',
string $password = '',
integer $debug_level = 0,
): boolean
Simple static wrapper for all-in-one POP before SMTP
Simple static wrapper for all-in-one POP before SMTP Parameters
|
# | ||||||
public
|
authorise(
string $host,
integer|boolean $port = false,
integer|boolean $timeout = false,
string $username = '',
string $password = '',
integer $debug_level = 0,
): boolean
Authenticate with a POP3 server.
A connect, login, disconnect sequence
appropriate for POP-before SMTP authorisation.
Authenticate with a POP3 server. A connect, login, disconnect sequence appropriate for POP-before SMTP authorisation. Parameters
|
# | ||||||
public
|
connect(string $host, integer|boolean $port = false, integer $tval = 30): boolean
Connect to a POP3 server.
Connect to a POP3 server. |
# | ||||||
public
|
login(string $username = '', string $password = ''): boolean
Log in to the POP3 server.
Does not support APOP (RFC 2828, 4949).
Log in to the POP3 server. Does not support APOP (RFC 2828, 4949). |
# | ||||||
public
|
disconnect()
Disconnect from the POP3 server.
Disconnect from the POP3 server. |
# | ||||||
protected
|
getResponse(integer $size = 128): string
Get a response from the POP3 server.
$size is the maximum number of bytes to retrieve
Get a response from the POP3 server. $size is the maximum number of bytes to retrieve |
# | ||||||
protected
|
sendString(string $string): integer
Send raw data to the POP3 server.
Send raw data to the POP3 server. |
# | ||||||
protected
|
checkResponse(string $string): boolean
Checks the POP3 server response.
Looks for for +OK or -ERR.
Checks the POP3 server response. Looks for for +OK or -ERR. |
# | ||||||
protected
|
setError($error)
Add an error to the internal error store.
Also display debug output if it's enabled.
Add an error to the internal error store. Also display debug output if it's enabled. |
# | ||||||
public
|
getErrors(): array
Get an array of error messages, if any.
Get an array of error messages, if any. |
# | ||||||
protected
|
catchWarning(integer $errno, string $errstr, string $errfile, integer $errline)
POP3 connection error handler.
POP3 connection error handler. |
# |
Constants | ||
---|---|---|
public
|
CRLF = "\r\n"
Line break constant
Line break constant |
# |
Properties | |||
---|---|---|---|
public
|
string
|
$Version = '5.2.28'
|
# |
public
|
integer
|
$POP3_PORT = 110
|
# |
public
|
integer
|
$POP3_TIMEOUT = 30
|
# |
public
|
string
|
$CRLF = "\r\n"
|
# |
public
|
integer
|
$do_debug = 0
|
# |
public
|
string
|
$host
|
# |
public
|
integer
|
$port
|
# |
public
|
integer
|
$tval
|
# |
public
|
string
|
$username
|
# |
public
|
string
|
$password
|
# |
protected
|
resource
|
$pop_conn
|
# |
protected
|
boolean
|
$connected = false
|
# |
protected
|
array
|
$errors = []
|
# |