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 89E6269B9 for ; Mon, 13 Jun 2011 14:06:49 +0000 (UTC) Received: (qmail 13042 invoked by uid 500); 13 Jun 2011 14:06:49 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 13015 invoked by uid 500); 13 Jun 2011 14:06:49 -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 13007 invoked by uid 99); 13 Jun 2011 14:06:49 -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 14:06:49 +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 14:06:39 +0000 Received: from zimbra.alfresco.com ([88.151.129.3]) by eu1sys200aob118.postini.com ([207.126.147.11]) with SMTP ID DSNKTfYZWv50WlySiyDtwWyJlu49lLz4bSE9@postini.com; Mon, 13 Jun 2011 14:06:19 UTC Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.alfresco.com (Postfix) with ESMTP id 6C96444C0B6 for ; Mon, 13 Jun 2011 15:06:18 +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 n3-gv+18zixS for ; Mon, 13 Jun 2011 15:06:18 +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 3C1C342C551 for ; Mon, 13 Jun 2011 15:06:18 +0100 (BST) Date: Mon, 13 Jun 2011 15:06:17 +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: <422E28B4-BED2-4A4E-BA5F-D619FA21C365@zaizi.com> 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: > I'm using the MAPIMessage class to extract attachments from an email > message and have some troubles to extract embedded documents (E.g. a > message attached). I'm trying to go through DirectoryChunk, but I don't > find a way to extract them. Basically, I need to access to its filename, > raw data (InputStream?) and mimetype. Is it possible? How can I get > them? First up, make sure you're using 3.8 beta 3 as there has been some work done on the code recently On a MAPIMessage, call getAttachmentFiles() to get AttachmentChunks. On each attachment, use attachFileName / attachLongFileName to figure out if it's one you want. If it is, your data is in attachData Nick --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org