Return-Path: X-Original-To: apmail-poi-user-archive@www.apache.org Delivered-To: apmail-poi-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 520066980 for ; Mon, 13 Jun 2011 15:03:36 +0000 (UTC) Received: (qmail 3405 invoked by uid 500); 13 Jun 2011 15:03:35 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 3386 invoked by uid 500); 13 Jun 2011 15:03:35 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 3378 invoked by uid 99); 13 Jun 2011 15:03:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jun 2011 15:03:35 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of nick.burch@alfresco.com designates 207.126.144.145 as permitted sender) Received: from [207.126.144.145] (HELO eu1sys200aog118.obsmtp.com) (207.126.144.145) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 13 Jun 2011 15:03:26 +0000 Received: from zimbra.alfresco.com ([88.151.129.3]) by eu1sys200aob118.postini.com ([207.126.147.11]) with SMTP ID DSNKTfYmqYnyO66a6QJk+FFTglxaGtj0j/H8@postini.com; Mon, 13 Jun 2011 15:03:06 UTC Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.alfresco.com (Postfix) with ESMTP id 8D4E94147DE for ; Mon, 13 Jun 2011 16:03:05 +0100 (BST) X-Virus-Scanned: amavisd-new at unx-d-manc4.tc.ifeltd.com Received: from zimbra.alfresco.com ([127.0.0.1]) by localhost (zimbra.alfresco.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rZhAxJ6m6oA2 for ; Mon, 13 Jun 2011 16:03:05 +0100 (BST) Received: from urchin.earth.li (urchin.earth.li [212.13.204.73]) (Authenticated sender: nick.burch@alfresco.com) by zimbra.alfresco.com (Postfix) with ESMTP id 5FF6041450A for ; Mon, 13 Jun 2011 16:03:05 +0100 (BST) Date: Mon, 13 Jun 2011 16:03:05 +0100 (BST) From: Nick Burch X-X-Sender: nick@urchin.earth.li To: POI Users List Subject: Re: How to extract embedded documents from a .msg In-Reply-To: Message-ID: References: <422E28B4-BED2-4A4E-BA5F-D619FA21C365@zaizi.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org On Mon, 13 Jun 2011, Ezequiel Foncubierta wrote: > There is another case, when the message has an embedded > image/video/whatever you got the same, therefore you shouldn't use > getAsEmbededMessage to get the embedded document. I've not seen that. Any chance you could open a new bug in bugzilla, and upload a sample file that shows this? (We can then use this as a basis for enhancing DirectoryChunk, and unit testing it) > On the other hand, is it possible to get the raw data from a MAPIMessage > object? >From a DirectoryChunk you can get the underlying POIFS DirectoryNode with a call to getDirectory(). From their, loop over all the directory entries looking for something you find interesting. When you have something that catches your eye, DocumentInputStream will let you read it. See http://poi.apache.org/poifs/how-to.html for information on working at the POIFS level Nick --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org