Methods

create instance with parameters Supported parameters are - host hostname or ip address of POP3 server - user username - password password for user 'username' [optional, default = ''] - port port for POP3 server [optional, default = 110] - ssl 'SSL' or 'TLS' for secure sockets

__construct(\Zend\Mail\Storage\$params $params) 

Parameters

$params

\Zend\Mail\Storage\$params

array mail reader specific parameters

Exceptions

\Zend\Mail\Storage\Exception\InvalidArgumentException
\Zend\Mail\Protocol\Exception\RuntimeException

Destructor calls close() and therefore closes the resource.

__destruct() 
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::__destruct()

Special handling for hasTop and hasUniqueid.

__get(string $var) : string

The headers of the first message is retrieved if Top wasn't needed/tried yet.

see \Zend\Mail\Storage\AbstractStorage::__get()

Parameters

$var

string

Exceptions

\Zend\Mail\Storage\Exception\InvalidArgumentException

Returns

string

Close resource for mail lib.

close() 

If you need to control, when the resource is closed. Otherwise the destructor would call this.

Countable::count()

count() : int
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::count()

Returns

int

Count messages all messages in current box

countMessages() : int

Iterator::current()

current() : \Zend\Mail\Storage\Message
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::current()

Returns

Get a full list of features supported by the specific mail lib and the server

getCapabilities() : array
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::getCapabilities()

Returns

arraylist of features as array(feature_name => true|false[|null])

Fetch a message

getMessage(int $id) : \Zend\Mail\Storage\Message

Parameters

$id

int

number of message

Exceptions

\Zend\Mail\Protocol\Exception\ExceptionInterface

Returns

get a message number from a unique id

getNumberByUniqueId(string $id) : int

I.e. if you have a webmailer that supports deleting messages you should use unique ids as parameter and use this method to translate it to message number right before calling removeMessage()

Parameters

$id

string

unique id

Exceptions

\Zend\Mail\Storage\Exception\InvalidArgumentException

Returns

intmessage number

Get raw content of message or part

getRawContent(int $id, null | array | string $part) : string

Parameters

$id

int

number of message

$part

nullarraystring

path to part or null for message content

Returns

stringraw content

Get raw header of message or part

getRawHeader(int $id, null | array | string $part, int $topLines) : string

Parameters

$id

int

number of message

$part

nullarraystring

path to part or null for message header

$topLines

int

include this many lines with header (after an empty line)

Returns

stringraw header

get a list of messages with number and size

getSize(int $id) : int | array

Parameters

$id

int

number of message

Exceptions

\Zend\Mail\Protocol\Exception\ExceptionInterface

Returns

intarraysize of given message of list with all messages as array(num => size)

get unique id for one or all messages

getUniqueId(int | null $id) : array | string

if storage does not support unique ids it's the same as the message number

Parameters

$id

intnull

message number

Exceptions

\Zend\Mail\Storage\Exception\ExceptionInterface

Returns

arraystringmessage number for given message or all messages as array

Iterator::key()

key() : int
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::key()

Returns

intid of current position

Keep the server busy.

noop() 

ArrayAccess::offsetExists()

offsetExists(int $id) : bool
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::offsetExists()

Parameters

$id

int

Returns

bool

ArrayAccess::offsetGet()

offsetGet(int $id) : \Zend\Mail\Storage\Message
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::offsetGet()

Parameters

$id

int

Returns

ArrayAccess::offsetSet()

offsetSet(mixed $id, mixed $value) 
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::offsetSet()

Parameters

$id

mixed

$value

mixed

Exceptions

\Zend\Mail\Storage\Exception\RuntimeException

ArrayAccess::offsetUnset()

offsetUnset(int $id) : bool
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::offsetUnset()

Parameters

$id

int

Returns

boolsuccess

Remove a message from server.

removeMessage(int $id) 

If you're doing that from a web environment you should be careful and use a uniqueid as parameter if possible to identify the message.

Parameters

$id

int

number of message

Exceptions

\Zend\Mail\Protocol\Exception\RuntimeException

Iterator::rewind()

rewind() 
Inherited

Rewind always gets the new count from the storage. Thus if you use the interfaces and your scripts take long you should use reset() from time to time.

inherited_from \Zend\Mail\Storage\AbstractStorage::rewind()

SeekableIterator::seek()

seek(int $pos) 
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::seek()

Parameters

$pos

int

Exceptions

\Zend\Mail\Storage\Exception\OutOfBoundsException

Iterator::valid()

valid() : bool
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::valid()

Returns

bool

 Properties

 

class capabilities with default values

$has : array
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::$$has
 

maximum iteration position (= message count)

$iterationMax : null | int
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::$$iterationMax
 

current iteration position

$iterationPos : int
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::$$iterationPos
 

used message class, change it in an extended class to extend the returned message class

$messageClass : string
Inherited

inherited_from \Zend\Mail\Storage\AbstractStorage::$$messageClass
 

protocol handler

$protocol : null | \Zend\Mail\Protocol\Pop3