Path

ez components / documentation / api reference / 1.0.1 / mail


eZ Components 1.0.1

Mail: ezcMailText

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcMailText

Mail part used for sending all forms of plain text. [source]
Example: ezcMailText in a plain text message
1.  $textPart new ezcMailText"This is a text message" );
Example: ezcMailText in a HTML message
1.  $textPart new ezcMailText"<html>This is an <b>HTML</b> message"</html);
2.  $textPart->subType 'html';
property charset The characterset used for this text part. Defaults to 'us-ascii'. property subType The subtype of this text part. Defaults to 'plain' for plain text. Use 'html' for HTML messages. property encoding The encoding of the text. Defaults to eight bit. property text The main data of this text part.

Parents

ezcMailPart
   |
   --ezcMailText

Method Summary

public ezcMailText __construct( $text, [$charset = "us-ascii"], [$encoding = ezcMail::EIGHT_BIT] )
Constructs a new TextPart with the given $text, $charset and $encoding.
public string generateBody( )
Returns the generated text body of this part as a string.
public string generateHeaders( )
Returns the headers set for this part as a RFC822 compliant string.
public void __get( $name, $value )
Sets the property $name to $value.
public void __set( $name, $value )
Sets the property $name to $value.

Inherited Methods

From ezcMailPart :
public void ezcMailPart::appendExcludeHeaders()
The array $headers will be excluded when the headers are generated.
public string ezcMailPart::generate()
Returns the complete mail part including both the header and the body as a string.
public abstract string ezcMailPart::generateBody()
Returns the body of this part as a string.
public string ezcMailPart::generateHeaders()
Returns the headers set for this part as a RFC 822 string.
public string ezcMailPart::getHeader()
Returns the value of the header $name.
public void ezcMailPart::setHeader()
Sets the header $name to the value $value.

Methods

__construct

ezcMailText __construct( string $text, [string $charset = "us-ascii"], [int $encoding = ezcMail::EIGHT_BIT] )
Constructs a new TextPart with the given $text, $charset and $encoding.

Parameters

Name Type Description
$text string  
$charset string  
$encoding int  

generateBody

string generateBody( )
Returns the generated text body of this part as a string.

Redefinition of

Method Description
ezcMailPart::generateBody() Returns the body of this part as a string.

generateHeaders

string generateHeaders( )
Returns the headers set for this part as a RFC822 compliant string.
This method does not add the required two lines of space to separate the headers from the body of the part.

See also:

ezcMailPart::setHeader().

Redefinition of

Method Description
ezcMailPart::generateHeaders() Returns the headers set for this part as a RFC 822 string.

__get

void __get( string $name, mixed $value )
Sets the property $name to $value.

Parameters

Name Type Description
$name string  
$value mixed  

Throws

ClassDescription
ezcBasePropertyNotFoundException if the property does not exist.

__set

void __set( string $name, mixed $value )
Sets the property $name to $value.

Parameters

Name Type Description
$name string  
$value mixed  

Throws

ClassDescription
ezcBasePropertyNotFoundException if the property does not exist.

Last updated: Fri, 02 Nov 2007