Class POP3

Description

POP Before SMTP Authentication Class Version 5.2.1

Author: Richard Davey (rich@corephp.co.uk) Modifications: Andy Prevost License: LGPL, see PHPMailer License

Specifically for PHPMailer to allow POP before SMTP authentication. Does not yet work with APOP - if you have an APOP account, contact Richard Davey and we can test changes to this script.

This class is based on the structure of the SMTP class originally authored by Chris Ryan

This class is rfc 1939 compliant and implements all the commands required for POP3 connection, authentication and disconnection.

  • author: Richard Davey

Located in /libraries/phpmailer/pop3.php (line 59)


	
			
Variable Summary
mixed $connected
string $CRLF
int $do_debug
mixed $error
string $host
string $password
mixed $pop_conn
int $port
int $tval
string $username
string $Version
Method Summary
void Authorise (string $host, [integer $port = false], [integer $tval = false], string $username, string $password, [ $debug_level = 0])
void catchWarning (integer $errno, string $errstr, string $errfile, integer $errline)
boolean checkResponse (string $string)
boolean Connect (string $host, [integer $port = false], [integer $tval = 30])
void Disconnect ()
void displayErrors ()
string getResponse ([integer $size = 128])
boolean Login ([string $username = ''], [string $password = ''])
integer sendString (string $string)
Variables
mixed $connected (line 125)
  • access: private
string $CRLF = "\r\n" (line 76)

POP3 Carriage Return + Line Feed

  • access: public
int $do_debug = 2 (line 82)

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

  • access: public
mixed $error (line 126)
  • access: private
string $host (line 88)

POP3 Mail Server

  • access: public
string $password (line 112)

POP3 Password

  • access: public
int $POP3_PORT = 110 (line 64)

Default POP3 port

  • access: public
int $POP3_TIMEOUT = 30 (line 70)

Default Timeout

  • access: public
mixed $pop_conn (line 124)
  • access: private
int $port (line 94)

POP3 Port

  • access: public
int $tval (line 100)

POP3 Timeout Value

  • access: public
string $username (line 106)

POP3 Username

  • access: public
string $Version = '5.2.1' (line 118)

Sets the POP3 PHPMailer Version number

  • access: public
Methods
Constructor __construct (line 133)

Constructor, sets the initial values

  • access: public
POP3 __construct ()
Authorise (line 148)

Combination of public events - connect, login, disconnect

  • access: public
void Authorise (string $host, [integer $port = false], [integer $tval = false], string $username, string $password, [ $debug_level = 0])
  • string $host
  • integer $port
  • integer $tval
  • string $username
  • string $password
  • $debug_level
catchWarning (line 400)

Takes over from PHP for the socket warning handler

  • access: private
void catchWarning (integer $errno, string $errstr, string $errfile, integer $errline)
  • integer $errno
  • string $errstr
  • string $errfile
  • integer $errline
checkResponse (line 359)

Checks the POP3 server response for +OK or -ERR

  • access: private
boolean checkResponse (string $string)
  • string $string
Connect (line 200)

Connect to the POP3 server

  • access: public
boolean Connect (string $host, [integer $port = false], [integer $tval = 30])
  • string $host
  • integer $port
  • integer $tval
Disconnect (line 318)

Disconnect from the POP3 server

  • access: public
void Disconnect ()
displayErrors (line 382)

If debug is enabled, display the error message array

  • access: private
void displayErrors ()
getResponse (line 335)

Get the socket response back.

$size is the maximum number of bytes to retrieve

  • access: private
string getResponse ([integer $size = 128])
  • integer $size
Login (line 275)

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

  • access: public
boolean Login ([string $username = ''], [string $password = ''])
  • string $username
  • string $password
sendString (line 347)

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

  • access: private
integer sendString (string $string)
  • string $string

Documentation generated on Mon, 25 Jun 2012 13:58:51 -0500 by phpDocumentor 1.4.4