From fba1f5ab813f2eb4bedc5d9c4a75e77bbaa90131 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Mon, 10 Dec 2007 10:27:19 -0500 Subject: [PATCH] New class rcube_user + send message disposition notification --- program/lib/rc_mail_mime.inc | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/program/lib/rc_mail_mime.inc b/program/lib/rc_mail_mime.inc index 12d80bb..ca4d0bf 100644 --- a/program/lib/rc_mail_mime.inc +++ b/program/lib/rc_mail_mime.inc @@ -25,6 +25,14 @@ 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 @@ return true; } - + /** * returns the HTML body portion of the message @@ -73,6 +81,22 @@ function getHTMLBody() { return $this->_htmlbody; + } + + + /** + * 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; } @@ -138,7 +162,7 @@ // 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); -- Gitblit v1.9.1