API - XOOPS 2.5.11 Beta 2
By monxoops.fr
POP3 Class Reference

Public Member Functions

 authorise ($host, $port=false, $timeout=false, $username='', $password='', $debug_level=0)
 
 connect ($host, $port=false, $tval=30)
 
 login ($username='', $password='')
 
 disconnect ()
 
 getErrors ()
 

Static Public Member Functions

static popBeforeSmtp ( $host, $port=false, $timeout=false, $username='', $password='', $debug_level=0)
 

Data Fields

 $Version = '5.2.28'
 
 $POP3_PORT = 110
 
 $POP3_TIMEOUT = 30
 
 $CRLF = "\r\n"
 
 $do_debug = 0
 
 $host
 
 $port
 
 $tval
 
 $username
 
 $password
 
const CRLF = "\r\n"
 

Protected Member Functions

 getResponse ($size=128)
 
 sendString ($string)
 
 checkResponse ($string)
 
 setError ($error)
 
 catchWarning ($errno, $errstr, $errfile, $errline)
 

Protected Attributes

 $pop_conn
 
 $connected = false
 
 $errors = array()
 

Member Function Documentation

◆ authorise()

authorise (   $host,
  $port = false,
  $timeout = false,
  $username = '',
  $password = '',
  $debug_level = 0 
)

Authenticate with a POP3 server. A connect, login, disconnect sequence appropriate for POP-before SMTP authorisation. @access public

Parameters
string$hostThe hostname to connect to
integer | boolean$portThe port number to connect to
integer | boolean$timeoutThe timeout value
string$username
string$password
integer$debug_level
Returns
boolean
Here is the call graph for this function:
Here is the caller graph for this function:

◆ catchWarning()

catchWarning (   $errno,
  $errstr,
  $errfile,
  $errline 
)
protected

POP3 connection error handler.

Parameters
integer$errno
string$errstr
string$errfile
integer$errline@access protected
Here is the call graph for this function:

◆ checkResponse()

checkResponse (   $string)
protected

Checks the POP3 server response. Looks for for +OK or -ERR.

Parameters
string$string
Returns
boolean @access protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ connect()

connect (   $host,
  $port = false,
  $tval = 30 
)

Connect to a POP3 server. @access public

Parameters
string$host
integer | boolean$port
integer$tval
Returns
boolean
Here is the call graph for this function:
Here is the caller graph for this function:

◆ disconnect()

disconnect ( )

Disconnect from the POP3 server. @access public

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getErrors()

getErrors ( )

Get an array of error messages, if any.

Returns
array

◆ getResponse()

getResponse (   $size = 128)
protected

Get a response from the POP3 server. $size is the maximum number of bytes to retrieve

Parameters
integer$size
Returns
string @access protected
Here is the caller graph for this function:

◆ login()

login (   $username = '',
  $password = '' 
)

Log in to the POP3 server. Does not support APOP (RFC 2828, 4949). @access public

Parameters
string$username
string$password
Returns
boolean
Here is the call graph for this function:
Here is the caller graph for this function:

◆ popBeforeSmtp()

static popBeforeSmtp (   $host,
  $port = false,
  $timeout = false,
  $username = '',
  $password = '',
  $debug_level = 0 
)
static

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

Parameters
$host
integer | boolean$portThe port number to connect to
integer | boolean$timeoutThe timeout value
string$username
string$password
integer$debug_level
Returns
boolean
Here is the call graph for this function:

◆ sendString()

sendString (   $string)
protected

Send raw data to the POP3 server.

Parameters
string$string
Returns
integer @access protected
Here is the caller graph for this function:

◆ setError()

setError (   $error)
protected

Add an error to the internal error store. Also display debug output if it's enabled.

Parameters
$error@access protected
Here is the caller graph for this function:

Field Documentation

◆ $connected

$connected = false
protected

◆ $CRLF

$CRLF = "\r\n"

◆ $do_debug

$do_debug = 0

◆ $errors

$errors = array()
protected

◆ $host

$host

◆ $password

$password

◆ $POP3_PORT

$POP3_PORT = 110

◆ $POP3_TIMEOUT

$POP3_TIMEOUT = 30

◆ $pop_conn

$pop_conn
protected

◆ $port

$port

◆ $tval

$tval

◆ $username

$username

◆ $Version

$Version = '5.2.28'

◆ CRLF

const CRLF = "\r\n"

Line break constant


The documentation for this class was generated from the following file: