diff options
| author | estadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-09-14 03:49:28 +0000 |
|---|---|---|
| committer | estadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-09-14 03:49:28 +0000 |
| commit | a4332663cfcdb53b352c8646f78855ae3436cfec (patch) | |
| tree | ceaf2d8afbf791e9d007cfe7a676fc1e0790b7a6 /roundcubemail/program/lib/Mail/mime.php | |
| parent | 8b3252550799d1b69ba8ff0c0fb3f916608c2e1d (diff) | |
Initial TinyMCE editor support (still need to work on spellcheck and skins)
git-svn-id: https://svn.roundcube.net/trunk@344 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib/Mail/mime.php')
| -rw-r--r-- | roundcubemail/program/lib/Mail/mime.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/roundcubemail/program/lib/Mail/mime.php b/roundcubemail/program/lib/Mail/mime.php index eb4807336..96d7025d8 100644 --- a/roundcubemail/program/lib/Mail/mime.php +++ b/roundcubemail/program/lib/Mail/mime.php @@ -198,6 +198,16 @@ class Mail_mime } /** + * 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. * * @param string $file The image file name OR image data itself @@ -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; } |
