API Documentation

Mail/Protocol/Pop3.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Mail
subpackage
Protocol
version
$Id: Pop3.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Mail_Protocol_Pop3

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Mail_Protocol_Pop3

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Mail
subpackage
Protocol
Constants
TIMEOUT_CONNECTION
Properties
$hasTop
$_socket
$_timestamp
Methods
__construct
__destruct
connect
sendRequest
readResponse
request
logout
capa
login
status
getList
uniqueid
top
retrive
retrieve
noop
delete
undelete

Description

Constants

TIMEOUT_CONNECTION

 TIMEOUT_CONNECTION = '30'

Default timeout in seconds for initiating session

Details

value
30

Properties

$_socket

null|resource $_socket = ''

socket to pop3

Details

$_socket
null|resource
visibility
protected
default
final
false
static
false

$_timestamp

null|string $_timestamp = ''

greeting timestamp for apop

Details

$_timestamp
null|string
visibility
protected
default
final
false
static
false

$hasTop

null|bool $hasTop = 'null'

saves if server supports top

Details

$hasTop
null|bool
visibility
public
default
null
final
false
static
false

Methods

__construct

__construct( string $host, int|null $port = null, bool|string $ssl = false ) :

Public constructor

Arguments
$host
string
hostname or IP address of POP3 server, if given connect() is called
$port
intnull
port of POP3 server, null for default (110 or 995 for ssl)
$ssl
boolstring
use ssl? 'SSL', 'TLS' or false
Details
visibility
public
final
false
static
false
throws

__destruct

__destruct( ) :

Public destructor

Details
visibility
public
final
false
static
false

capa

capa( ) : array

Get capabilities from POP3 server

Output
array
list of capabilities
Details
visibility
public
final
false
static
false
throws

connect

connect( string $host, int|null $port = null, string|bool $ssl = false ) : string

Open connection to POP3 server

Arguments
$host
string
hostname or IP address of POP3 server
$port
intnull
of POP3 server, default is 110 (995 for ssl)
$ssl
stringbool
use 'SSL', 'TLS' or false
Output
string
welcome message
Details
visibility
public
final
false
static
false
throws

delete

delete(  $msgno ) : null

Make a DELE count to remove a message

Arguments
$msgno
Output
null
Details
visibility
public
final
false
static
false
throws

getList

getList( int|null $msgno = null ) : int|array

Make LIST call for size of message(s)

Arguments
$msgno
intnull
number of message, null for all
Output
int|array
size of given message or list with array(num => size)
Details
visibility
public
final
false
static
false
throws

login

login( string $user, string $password,  $tryApop = true ) : void

Login to POP3 server. Can use APOP

Arguments
$user
string
username
$password
string
password
$tryApop
Details
visibility
public
final
false
static
false
throws

logout

logout( ) : null

End communication with POP3 server (also closes socket)

Output
null
Details
visibility
public
final
false
static
false

noop

noop( ) : null

Make a NOOP call, maybe needed for keeping the server happy

Output
null
Details
visibility
public
final
false
static
false
throws

readResponse

readResponse( boolean $multiline = false ) : string

read a response

Arguments
$multiline
boolean
response has multiple lines and should be read until "<nl>.<nl>"
Output
string
response
Details
visibility
public
final
false
static
false
throws

request

request( string $request, bool $multiline = false ) : string

Send request and get resposne

Arguments
$request
string
request
$multiline
bool
multiline response?
Output
string
result from readResponse()
Details
visibility
public
final
false
static
false
see
sendRequest(), readResponse()
throws

retrieve

retrieve( int $msgno ) : string

Make a RETR call for retrieving a full message with headers and body

Arguments
$msgno
int
message number
Output
string
message
Details
visibility
public
final
false
static
false
throws

retrive

retrive( int $msgno ) : string

Make a RETR call for retrieving a full message with headers and body

Arguments
$msgno
int
message number
Output
string
message
Details
visibility
public
final
false
static
false
deprecated
since 1.1.0; this method has a typo - please use retrieve()
throws

sendRequest

sendRequest( string $request ) : null

Send a request

Arguments
$request
string
your request without newline
Output
null
Details
visibility
public
final
false
static
false
throws

status

status( int $messages, int $octets ) : void

Make STAT call for message count and size sum

Arguments
$messages
int
out parameter with count of messages
$octets
int
out parameter with size in octects of messages
Details
visibility
public
final
false
static
false
throws

top

top( int $msgno, int $lines = 0, bool $fallback = false ) : string

Make TOP call for getting headers and maybe some body lines This method also sets hasTop - before it it's not known if top is supported

The fallback makes normale RETR call, which retrieves the whole message. Additional lines are not removed.

Arguments
$msgno
int
number of message
$lines
int
number of wanted body lines (empty line is inserted after header lines)
$fallback
bool
fallback with full retrieve if top is not supported
Output
string
message headers with wanted body lines
Details
visibility
public
final
false
static
false
throws

undelete

undelete( ) : null

Make RSET call, which rollbacks delete requests

Output
null
Details
visibility
public
final
false
static
false
throws

uniqueid

uniqueid( int|null $msgno = null ) : string|array

Make UIDL call for getting a uniqueid

Arguments
$msgno
intnull
number of message, null for all
Output
string|array
uniqueid of message or list with array(num => uniqueid)
Details
visibility
public
final
false
static
false
throws
Documentation was generated by DocBlox.