[cvs] [Wiki] changed: MIMEHowTo

Jan Schneider jan at horde.org
Thu Jul 1 05:35:13 PDT 2004


jan  Thu,  1 Jul 2004 05:35:13 -0700

Modified page: http://wiki.horde.org/display.php?page=MIMEHowTo
New Revision:  1.4

@@ -39,9 +39,9 @@
 
 <php>
 require_once 'Horde/MIME/Structure.php';
 $message = &MIME_Structure::parseTextMIMEMessage($message_text);
-$message->getPart($mime_id);
+$part = $message->getPart($mime_id);
 </php>
 
 To determine the structure of the MIME message, e.g. to find out the MIME ID we are looking for:
 
@@ -50,4 +50,15 @@
 </php>
 
 $map is an array with key being the MIME IDs and values being the Content Types of that IDs.
 
+
+++ Using MIME Viewers
+
+Scenario: Continuing the previous example we want to render the text/calendar part to HTML. ''This code currently only works inside of a Horde application because it relies on the registry and Horde's configuration files.''
+
+<php>
+require HORDE_BASE . '/config/mime_drivers.php';
+require_once 'Horde/MIME/Viewer.php';
+$viewer = &MIME_Viewer::factory($part);
+$html = $viewer->render();
+</php>


More information about the cvs mailing list