From a0109c4933e0bfb5ed9dbcf94f932991ca689542 Mon Sep 17 00:00:00 2001 From: svncommit Date: Thu, 14 Sep 2006 03:49:28 +0000 Subject: Initial TinyMCE editor support (still need to work on spellcheck and skins) --- program/lib/Mail/mime.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'program/lib/Mail') diff --git a/program/lib/Mail/mime.php b/program/lib/Mail/mime.php index eb4807336..96d7025d8 100644 --- a/program/lib/Mail/mime.php +++ b/program/lib/Mail/mime.php @@ -197,6 +197,16 @@ class Mail_mime return true; } + /** + * returns the HTML body portion of the message + * @return string HTML body of the message + * @access public + */ + function getHTMLBody() + { + return $this->_htmlbody; + } + /** * Adds an image to the list of embedded images. * @@ -206,11 +216,13 @@ class Mail_mime * Only use if $file is the image data * @param bool $isfilename Whether $file is a filename or not * Defaults to true + * @param string $contentid Desired Content-ID of MIME part + * Defaults to generated unique ID * @return mixed true on success or PEAR_Error object * @access public */ function addHTMLImage($file, $c_type='application/octet-stream', - $name = '', $isfilename = true) + $name = '', $isfilename = true, $contentid = '') { $filedata = ($isfilename === true) ? $this->_file2str($file) : $file; @@ -222,11 +234,14 @@ class Mail_mime if (PEAR::isError($filedata)) { return $filedata; } + if ($contentid == '') { + $contentid = md5(uniqid(time())); + } $this->_html_images[] = array( 'body' => $filedata, 'name' => $filename, 'c_type' => $c_type, - 'cid' => md5(uniqid(time())) + 'cid' => $contentid ); return true; } -- cgit v1.2.3