From fba1f5ab813f2eb4bedc5d9c4a75e77bbaa90131 Mon Sep 17 00:00:00 2001 From: thomascube Date: Mon, 10 Dec 2007 15:27:19 +0000 Subject: New class rcube_user + send message disposition notification --- program/lib/rc_mail_mime.inc | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'program/lib/rc_mail_mime.inc') diff --git a/program/lib/rc_mail_mime.inc b/program/lib/rc_mail_mime.inc index 12d80bbfb..ca4d0bf93 100644 --- a/program/lib/rc_mail_mime.inc +++ b/program/lib/rc_mail_mime.inc @@ -25,6 +25,14 @@ require_once('Mail/mime.php'); class rc_mail_mime extends Mail_mime { + /** + * Set build parameters + */ + function setParam($param) + { + if (is_array($param)) + $this->_build_params = array_merge($this->_build_params, $param); + } /** * Adds an image to the list of embedded images. @@ -63,7 +71,7 @@ class rc_mail_mime extends Mail_mime return true; } - + /** * returns the HTML body portion of the message @@ -76,6 +84,22 @@ class rc_mail_mime extends Mail_mime } + /** + * Creates a new mimePart object, using multipart/mixed as + * the initial content-type and returns it during the + * build process. + * + * @return object The multipart/mixed mimePart object + * @access private + */ + function &_addMixedPart() + { + $params['content_type'] = $this->_headers['Content-Type'] ? $this->_headers['Content-Type'] : 'multipart/mixed'; + $ret = new Mail_mimePart('', $params); + return $ret; + } + + /** * Encodes a header as per RFC2047 * @@ -138,7 +162,7 @@ class rc_mail_mime extends Mail_mime // add chunk to output string by regarding the header maxlen $len = strlen($value); - if ($line_len + $len < $maxlen) + if ($i == 0 || $line_len + $len < $maxlen) { $hdr_value .= ($i>0?', ':'') . $value; $line_len += $len + ($i>0?2:0); -- cgit v1.2.3