Path

ez components / documentation / api reference / 2007.1.1 / mail


eZ Components 2007.1.1

Mail: ezcMailPop3Set

[ Tutorial ] [ Display example ] [ Mail listing example ] [ Rfcs ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcMailPop3Set

ezcMailPop3Set is an internal class that fetches a series of mail from the pop3 server. [source]

Implemented Interfaces

The pop3 set works on an existing connection and a list of the messages that the user wants to fetch. The user must accept all the data for each mail for correct behaviour.

Method Summary

public ezcMailPop3Set __construct( $connection, $messages, [$deleteFromServer = false] )
Constructs a new pop3 parser set that will fetch the messages with the id's.
public array(int=>int) getMessageNumbers( )
Returns message numbers for current set.
public string getNextLine( )
Returns one line of data from the current mail in the set.
public bool hasData( )
Returns whether the set has mails
public bool isFinished( )
Returns true if all the data has been fetched from this set.
public bool nextMail( )
Moves the set to the next mail and returns true upon success.

Methods

__construct

ezcMailPop3Set __construct( $connection, $messages, [bool $deleteFromServer = false] )
Constructs a new pop3 parser set that will fetch the messages with the id's.
$connection must hold a valid connection to a pop3 server that is ready to retrieve the messages.
If $deleteFromServer is set to true the messages will be deleted after retrieval.

Parameters

Name Type Description
$connection ezcMailTransportConnection  
$messages array(ezcMail)  
$deleteFromServer bool  

Throws

ClassDescription
ezcMailTransportException if the server sent a negative response.

getMessageNumbers

array(int=>int) getMessageNumbers( )
Returns message numbers for current set.

getNextLine

string getNextLine( )
Returns one line of data from the current mail in the set.
Null is returned if there is no current mail in the set or the end of the mail is reached,

hasData

bool hasData( )
Returns whether the set has mails

isFinished

bool isFinished( )
Returns true if all the data has been fetched from this set.

nextMail

bool nextMail( )
Moves the set to the next mail and returns true upon success.
False is returned if there are no more mail in the set.

Throws

ClassDescription
ezcMailTransportException if the server sent a negative response.

Last updated: Wed, 28 Nov 2007