Path

ez components / documentation / api reference / 1.1.1 / mail


eZ Components 1.1.1

Mail: ezcMailVariableSet

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

Class: ezcMailVariableSet

ezcMailVariableSet is an internal class that can be used to parse mail directly from a variable in your script. [source]

Implemented Interfaces

The variable should contain the complete mail message in RFC822 format.
Example:
1.  $mail "To: user@example.com\r\nSubject: Test mail    .....";
2.  $set new ezcMailVariableSet$mail ) );
3.  $parser new ezcMailParser();
4.  $mail $parser->parseMail$set );

Method Summary

public ezcMailVariableSet __construct( $mail, $files )
Constructs a new set that servers the files specified by $files.
public string getNextLine( )
Returns one line of data from the current mail in the set.
public bool nextMail( )
Moves the set to the next mail and returns true upon success.

Methods

__construct

ezcMailVariableSet __construct( $mail, array(string) $files )
Constructs a new set that servers the files specified by $files.
The set will start on the first file in the the array.

Parameters

Name Type Description
$files array(string)  
$mail  

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,

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.

Last updated: Thu, 01 Nov 2007