Copyright 2011-2016 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
/** * Embed the Kolab content into a new MIME Part. * * @param resource $content The Kolab content. * * @return Horde_Mime_Part The MIME part that encapsules the Kolab content. */ protected function createFreshKolabPart($content) { $part = new Horde_Mime_Part(); $part->setCharset('utf-8'); $part->setDisposition('inline'); $part->setDispositionParameter('x-kolab-type', 'xml'); $part->setName('kolab.xml'); $part->setType(Horde_Kolab_Storage_Object_MimeType::getMimeTypeFromObjectType($this->getType())); $part->setContents($content, array('encoding' => 'quoted-printable')); return $part; }
public function testNoMatchMimePartToFolderType() { $this->assertFalse(Horde_Kolab_Storage_Object_MimeType::matchMimePartToFolderType($this->getMultipartMimeMessage('application/x-vnd.kolab.event'), 'note')); }