Mail: ezcMailVariableSet
[ ]
[ Display example ] [ Mail listing example ] [ Rfcs ]
[ ]
[ ]
[ ]
[ ]
Class: ezcMailVariableSet
|
ezcMailVariableSet is an internal class that can be used to parse mail directly from a string 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 )
Constructs a new set that contains one mail from $mail. |
|
public string |
getNextLine(
)
Returns one line of data from the current mail in the set. |
|
public bool |
hasData(
)
Returns whether the variable set contains mails. |
|
public bool |
nextMail(
)
Moves the set to the next mail and returns true upon success. |
Methods
__construct
ezcMailVariableSet __construct(
string
$mail )
Constructs a new set that contains one mail from $mail.
Parameters
| Name |
Type |
Description |
$mail |
string |
|
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 variable set contains mails.
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 (always).
Last updated: Tue, 02 Dec 2008