I made some progress. I already can create iframes for all html messages and resize them for the correct content size. The source of the iframes is a generated link to view.php (actionID=view_attach). Unfortunately view.php is not working for HTML parts (http://bugs.horde.org/ticket/8581) so my code is not complete functional.