|
|
@@ -45,10 +45,23 @@ class Zend_Mime
|
|
|
const MULTIPART_MIXED = 'multipart/mixed';
|
|
|
const MULTIPART_RELATED = 'multipart/related';
|
|
|
|
|
|
+ /**
|
|
|
+ * Boundary
|
|
|
+ *
|
|
|
+ * @var null|string
|
|
|
+ */
|
|
|
protected $_boundary;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @var int
|
|
|
+ */
|
|
|
protected static $makeUnique = 0;
|
|
|
|
|
|
- // lookup-Tables for QuotedPrintable
|
|
|
+ /**
|
|
|
+ * Lookup-Tables for QuotedPrintable
|
|
|
+ *
|
|
|
+ * @var array
|
|
|
+ */
|
|
|
public static $qpKeys = array(
|
|
|
"\x00","\x01","\x02","\x03","\x04","\x05","\x06","\x07",
|
|
|
"\x08","\x09","\x0A","\x0B","\x0C","\x0D","\x0E","\x0F",
|
|
|
@@ -73,6 +86,9 @@ class Zend_Mime
|
|
|
"\xFF"
|
|
|
);
|
|
|
|
|
|
+ /**
|
|
|
+ * @var array
|
|
|
+ */
|
|
|
public static $qpReplaceValues = array(
|
|
|
"=00","=01","=02","=03","=04","=05","=06","=07",
|
|
|
"=08","=09","=0A","=0B","=0C","=0D","=0E","=0F",
|
|
|
@@ -97,6 +113,9 @@ class Zend_Mime
|
|
|
"=FF"
|
|
|
);
|
|
|
|
|
|
+ /**
|
|
|
+ * @var string
|
|
|
+ */
|
|
|
public static $qpKeysString =
|
|
|
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF";
|
|
|
|
|
|
@@ -117,9 +136,9 @@ class Zend_Mime
|
|
|
/**
|
|
|
* Encode a given string with the QUOTED_PRINTABLE mechanism and wrap the lines.
|
|
|
*
|
|
|
- * @param string $str
|
|
|
- * @param int $lineLength Defaults to {@link LINELENGTH}
|
|
|
- * @param int $lineEnd Defaults to {@link LINEEND}
|
|
|
+ * @param string $str
|
|
|
+ * @param int $lineLength Line length; defaults to {@link LINELENGTH}
|
|
|
+ * @param string $lineEnd Line end; defaults to {@link LINEEND}
|
|
|
* @return string
|
|
|
*/
|
|
|
public static function encodeQuotedPrintable($str,
|
|
|
@@ -177,10 +196,10 @@ class Zend_Mime
|
|
|
* Mail headers depend on an extended quoted printable algorithm otherwise
|
|
|
* a range of bugs can occur.
|
|
|
*
|
|
|
- * @param string $str
|
|
|
- * @param string $charset
|
|
|
- * @param int $lineLength Defaults to {@link LINELENGTH}
|
|
|
- * @param int $lineEnd Defaults to {@link LINEEND}
|
|
|
+ * @param string $str
|
|
|
+ * @param string $charset
|
|
|
+ * @param int $lineLength Line length; defaults to {@link LINELENGTH}
|
|
|
+ * @param string $lineEnd Line end; defaults to {@link LINEEND}
|
|
|
* @return string
|
|
|
*/
|
|
|
public static function encodeQuotedPrintableHeader($str, $charset,
|
|
|
@@ -250,10 +269,10 @@ class Zend_Mime
|
|
|
/**
|
|
|
* Encode a given string in mail header compatible base64 encoding.
|
|
|
*
|
|
|
- * @param string $str
|
|
|
- * @param string $charset
|
|
|
- * @param int $lineLength Defaults to {@link LINELENGTH}
|
|
|
- * @param int $lineEnd Defaults to {@link LINEEND}
|
|
|
+ * @param string $str
|
|
|
+ * @param string $charset
|
|
|
+ * @param int $lineLength Line length; defaults to {@link LINELENGTH}
|
|
|
+ * @param string $lineEnd Line end; defaults to {@link LINEEND}
|
|
|
* @return string
|
|
|
*/
|
|
|
public static function encodeBase64Header($str,
|
|
|
@@ -275,9 +294,9 @@ class Zend_Mime
|
|
|
* Encode a given string in base64 encoding and break lines
|
|
|
* according to the maximum linelength.
|
|
|
*
|
|
|
- * @param string $str
|
|
|
- * @param int $lineLength Defaults to {@link LINELENGTH}
|
|
|
- * @param int $lineEnd Defaults to {@link LINEEND}
|
|
|
+ * @param string $str
|
|
|
+ * @param int $lineLength Line length; defaults to {@link LINELENGTH}
|
|
|
+ * @param string $lineEnd Line end; defaults to {@link LINEEND}
|
|
|
* @return string
|
|
|
*/
|
|
|
public static function encodeBase64($str,
|
|
|
@@ -291,8 +310,6 @@ class Zend_Mime
|
|
|
* Constructor
|
|
|
*
|
|
|
* @param null|string $boundary
|
|
|
- * @access public
|
|
|
- * @return void
|
|
|
*/
|
|
|
public function __construct($boundary = null)
|
|
|
{
|
|
|
@@ -309,7 +326,7 @@ class Zend_Mime
|
|
|
*
|
|
|
* @param string $str
|
|
|
* @param string $encoding
|
|
|
- * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND}
|
|
|
+ * @param string $EOL Line end; defaults to {@link Zend_Mime::LINEEND}
|
|
|
* @return string
|
|
|
*/
|
|
|
public static function encode($str, $encoding, $EOL = self::LINEEND)
|
|
|
@@ -343,8 +360,7 @@ class Zend_Mime
|
|
|
/**
|
|
|
* Return a MIME boundary line
|
|
|
*
|
|
|
- * @param mixed $EOL Defaults to {@link LINEEND}
|
|
|
- * @access public
|
|
|
+ * @param string $EOL Line end; defaults to {@link LINEEND}
|
|
|
* @return string
|
|
|
*/
|
|
|
public function boundaryLine($EOL = self::LINEEND)
|
|
|
@@ -355,7 +371,7 @@ class Zend_Mime
|
|
|
/**
|
|
|
* Return MIME ending
|
|
|
*
|
|
|
- * @access public
|
|
|
+ * @param string $EOL Line end; defaults to {@link LINEEND}
|
|
|
* @return string
|
|
|
*/
|
|
|
public function mimeEnd($EOL = self::LINEEND)
|