Path

ez components / documentation / api reference / 1.1.1 / mail


eZ Components 1.1.1

Mail: ezcMailMboxTransport

[ Tutorial ] [ Display-example ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcMailMboxTransport

ezcMailMboxTransport implements mail retrieval from an mbox file. [source]
The mbox set is constructed from a file pointer and iterates over all the messages in an mbox file.

Member Variables

public resource(filepointer) $fh
Holds the filepointer to the mbox

Method Summary

public ezcMailMboxTransport __construct( $fileName )
Constructs the ezcMailMboxTransport object
public ezcMailMboxSet fetchAll( )
Returns an ezcMailMboxSet containing all the messages in the mbox.
public ezcMailMboxSet fetchByMessageNr( $number )
Returns an ezcMailMboxSet containing only the $number -th message in the mbox.
public array(int=>int) listMessages( )
This function reads through the whole mbox and returns starting positions of the messages.

Methods

__construct

ezcMailMboxTransport __construct( string $fileName )
Constructs the ezcMailMboxTransport object
Opens the mbox $fileName.

Parameters

Name Type Description
$fileName string  

Throws

ClassDescription
ezcBaseFileNotFoundException If the mbox file could not be found.
ezcBaseFilePermissionException If the mbox file could be opened for reading.

fetchAll

ezcMailMboxSet fetchAll( )
Returns an ezcMailMboxSet containing all the messages in the mbox.

fetchByMessageNr

ezcMailMboxSet fetchByMessageNr( int $number )
Returns an ezcMailMboxSet containing only the $number -th message in the mbox.

Parameters

Name Type Description
$number int  

Throws

ClassDescription
ezcMailNoSuchMessageException if the message $number is out of range.

listMessages

array(int=>int) listMessages( )
This function reads through the whole mbox and returns starting positions of the messages.

Last updated: Thu, 01 Nov 2007