|
Previous Page |
Solar_Mime |
Next Class |
headerValue()
static public
string
headerValue (
string $label,
string $value,
string $charset default 'utf-8',
string $crlf default ',
string $len default 75
)
Sanitizes a header value, then encodes and wraps as per RFC 2047.
Parameters
- (string)
$label: The sanitized header label; needed for line length calculations. - (string)
$value: The header value to encode. - (string)
$charset: The character set to note when encoding. - (string)
$crlf: The CRLF line-ending string to use when wrapping. - (string)
$len: The line-length to wrap at.
Returns
- (string) The encoded header value.
Description
Sanitizes a header value, then encodes and wraps as per RFC 2047.
Copied, with modifications, from the "mime.php" class in the PEAR Mail_Mime package (v 1.62). Takes the added step of "un-wrapping" the value (newline-and-space) and then removing all control characters (including newlines) before encoding and re-wrapping.