Mail: ezcMailText
[ ]
[ Display example ] [ Mail listing example ] [ Rfcs ]
[ ]
[ ]
[ ]
[ ]
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';
Parents
ezcMailPart
|
--ezcMailText
Properties
|
string |
read/write
|
$charset
The characterset used for this text part. Defaults to 'us-ascii' while creating mail, and is always 'utf-8' while parsing mail. |
|
string |
read/write
|
$encoding
The encoding of the text. Defaults to eight bit. |
|
string |
read
|
$originalCharset
The characterset in which a text part originally was before the conversion to UTF-8 when parsing incomming mail. |
|
string |
read/write
|
$subType
The subtype of this text part. Defaults to 'plain' for plain text. Use 'html' for HTML messages. |
|
string |
read/write
|
$text
The main data of this text part. |
Inherited Member Variables
From
ezcMailPart:
Method Summary
|
public ezcMailText |
__construct(
$text, [$charset = "us-ascii"], [$encoding = ezcMail::EIGHT_BIT], [$originalCharset = 'us-ascii'] )
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. |
Inherited Methods
From
ezcMailPart :
Methods
__construct
ezcMailText __construct(
string
$text, [string
$charset = "us-ascii"], [string
$encoding = ezcMail::EIGHT_BIT], [string
$originalCharset = 'us-ascii'] )
Constructs a new TextPart with the given $text, $charset and $encoding.
OriginalCharset is only used when parsing mail. Parsed mail will always be converted to UTF-8 in this case $originalCharset will hold the charset before it was converted.
Parameters
| Name |
Type |
Description |
$text |
string |
|
$charset |
string |
|
$encoding |
string |
|
$originalCharset |
string |
|
Redefinition of
generateBody
string generateBody(
)
Returns the generated text body of this part as a string.
Redefinition of
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
Last updated: Mon, 09 Feb 2009