Mail: ezcMailText
[ ]
[ ]
[ ]
[ ]
[ ]
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' while creating mail, and is always 'utf-8' while parsing mail. property originalCharset The characterset in which a text part originally was before the conversion to UTF-8. (readonly) 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], [$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. |
|
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 :
Methods
__construct
ezcMailText __construct(
string
$text, [string
$charset = "us-ascii"], [int
$encoding = ezcMail::EIGHT_BIT], [
$originalCharset = 'us-ascii'] )
Constructs a new TextPart with the given $text, $charset and $encoding.
Parameters
| Name |
Type |
Description |
$text |
string |
|
$charset |
string |
|
$encoding |
int |
|
$originalCharset |
|
|
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
__get
void __get(
string
$name, mixed
$value )
Sets the property $name to $value.
Parameters
| Name |
Type |
Description |
$name |
string |
|
$value |
mixed |
|
Throws
| Class | Description |
ezcBasePropertyNotFoundException |
if the property does not exist. |
Redefinition of
__set
void __set(
string
$name, mixed
$value )
Sets the property $name to $value.
Parameters
| Name |
Type |
Description |
$name |
string |
|
$value |
mixed |
|
Throws
| Class | Description |
ezcBasePropertyNotFoundException |
if the property does not exist. |
Redefinition of
Last updated: Wed, 28 Nov 2007