/**
* Encode header fields
*
* Encodes header content according to RFC1522 if it contains non-printable
* characters.
*
* @param string $value
* @return string
*/
protected function _encodeHeader($value) { if (Zend_Mime::
isPrintable($value) === false
) { if ($this->
getHeaderEncoding() === Zend_Mime::ENCODING_QUOTEDPRINTABLE
) { $value = Zend_Mime::
encodeQuotedPrintableHeader($value,
$this->
getCharset(), Zend_Mime::LINELENGTH, Zend_Mime::LINEEND
);
} else { $value = Zend_Mime::
encodeBase64Header($value,
$this->
getCharset(), Zend_Mime::LINELENGTH, Zend_Mime::LINEEND
);
} } return $value;
} /**
* Add a header to the message
*
* Adds a header to this message. If append is true and the header already
* exists, raises a flag indicating that the header should be appended.
*
* @param string $headerName
* @param string $value
* @param bool $append
*/