summaryrefslogtreecommitdiff
path: root/program/lib/rc_mail_mime.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-12-10 15:27:19 +0000
committerthomascube <thomas@roundcube.net>2007-12-10 15:27:19 +0000
commitfba1f5ab813f2eb4bedc5d9c4a75e77bbaa90131 (patch)
treecebde4edb06ac3a87eb2306b0c0125610a1bd5ce /program/lib/rc_mail_mime.inc
parentd39eecad6db1caee97624b80634587d98a75e701 (diff)
New class rcube_user + send message disposition notification
Diffstat (limited to 'program/lib/rc_mail_mime.inc')
-rw-r--r--program/lib/rc_mail_mime.inc28
1 files changed, 26 insertions, 2 deletions
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
@@ -77,6 +85,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
*
* @param array $input The header data to encode
@@ -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);