POP3

PHPMailer POP-Before-SMTP Authentication Class.

Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. 1) This class does not support APOP authentication. 2) Opening and closing lots of POP3 connections can be quite slow. If you need to send a batch of emails then just perform the authentication once at the start, and then loop through your mail sending script. Providing this process doesn't take longer than the verification period lasts on your POP3 server, you should be fine. 3) This is really ancient technology; you should only need to use it to talk to very old systems. 4) This POP3 class is deliberately lightweight and incomplete, implementing just enough to do authentication. If you want a more complete class there are other POP3 classes for PHP available.

author

Richard Davey (original author) rich@corephp.co.uk

author

Marcus Bointon (Synchro/coolbru) phpmailer@synchromedia.co.uk

author

Jim Jagielski (jimjag) jimjag@gmail.com

author

Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net

package

Default

Methods

Authenticate with a POP3 server.

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

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

Arguments

$host

string

The hostname to connect to

$port

integer|boolean

The port number to connect to

$timeout

integer|boolean

The timeout value

$username

string

$password

string

$debug_level

integer

Response

boolean

POP3 connection error handler.

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

Arguments

$errno

integer

$errstr

string

$errfile

string

$errline

integer

Checks the POP3 server response.

checkResponse(string $string): boolean

Looks for for +OK or -ERR.

Arguments

$string

string

Response

boolean

Connect to a POP3 server.

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

Arguments

$host

string

$port

integer|boolean

$tval

integer

Response

boolean

Disconnect from the POP3 server.

disconnect()

Get an array of error messages, if any.

getErrors(): array

Response

array

Get a response from the POP3 server.

getResponse(integer $size = 128): string

Arguments

$size

integer

The maximum number of bytes to retrieve

Response

string

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

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

Arguments

$host

string

The hostname to connect to

$port

integer|boolean

The port number to connect to

$timeout

integer|boolean

The timeout value

$username

string

$password

string

$debug_level

integer

Response

boolean

Send raw data to the POP3 server.

sendString(string $string): integer

Arguments

$string

string

Response

integer

Add an error to the internal error store.

setError(string $error)

Also display debug output if it's enabled.

Arguments

$error

string

Constants

The POP3 PHPMailer Version number.

VERSION
var

Default POP3 port number.

DEFAULT_PORT
var

Default timeout in seconds.

DEFAULT_TIMEOUT
var

Line break constant.

LE

Debug level for no output.

DEBUG_OFF
var

Debug level to show server -> client messages also shows clients connection errors or errors from server

DEBUG_SERVER
var

Debug level to show client -> server and server -> client messages.

DEBUG_CLIENT
var

Properties

POP3 class debug output mode.

do_debug :integer

Debug output level. Options:

see

No output

Server messages, connection/server errors

Client and Server messages, connection/server errors

var

Type(s)

integer

POP3 mail server hostname.

host :string
var

Type(s)

string

POP3 port number.

port :integer
var

Type(s)

integer

POP3 Timeout Value in seconds.

tval :integer
var

Type(s)

integer

POP3 username.

username :string
var

Type(s)

string

POP3 password.

password :string
var

Type(s)

string

Resource handle for the POP3 connection socket.

pop_conn :resource
var

Type(s)

resource

Are we connected?

connected :boolean
var

Type(s)

boolean

Error container.

errors :array
var

Type(s)

array