Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 11558 invoked from network); 20 Apr 2010 13:54:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Apr 2010 13:54:26 -0000 Received: (qmail 22988 invoked by uid 500); 20 Apr 2010 13:54:25 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 22953 invoked by uid 500); 20 Apr 2010 13:54:25 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 22945 invoked by uid 99); 20 Apr 2010 13:54:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Apr 2010 13:54:25 +0000 X-ASF-Spam-Status: No, hits=-1.2 required=10.0 tests=AWL,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [15.193.32.63] (HELO g6t0186.atlanta.hp.com) (15.193.32.63) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Apr 2010 13:54:16 +0000 Received: from G1W0400.americas.hpqcorp.net (g1w0400.americas.hpqcorp.net [16.236.31.10]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by g6t0186.atlanta.hp.com (Postfix) with ESMTPS id 80B082C879 for ; Tue, 20 Apr 2010 13:53:54 +0000 (UTC) Received: from G4W1852.americas.hpqcorp.net (16.234.97.230) by G1W0400.americas.hpqcorp.net (16.236.31.10) with Microsoft SMTP Server (TLS) id 8.2.176.0; Tue, 20 Apr 2010 13:53:10 +0000 Received: from GVW1154EXB.americas.hpqcorp.net ([16.232.35.140]) by G4W1852.americas.hpqcorp.net ([16.234.97.230]) with mapi; Tue, 20 Apr 2010 13:53:10 +0000 From: "Sharma, Ashish" To: "mime4j-dev@james.apache.org" Date: Tue, 20 Apr 2010 13:53:07 +0000 Subject: Email attachment parsing via mime4j Thread-Topic: Email attachment parsing via mime4j Thread-Index: AcrgkM6eapUbtbI6QEi72hg8PhTSyg== Message-ID: <3439D88AC8B9534AB0C26F8CA8F055C66733B4D5FB@GVW1154EXB.americas.hpqcorp.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi, I am using a small java smtp library (http://code.google.com/p/subethasmtp/= ), by this I need to parse the incoming emails in separate components viz b= ody, attachments etc. I am trying to use mime4j , but the documentation suggests that mime4j can = only give event notification or token notification and nothing else. For = stripping out body and attachments etc I had to use my own custom logic ins= ide the event handlers. Is my observation correct? If yes then how can I use mime4j to use for my requirement. Please suggest. I badly need an approach that takes in the smtp data stream and returns me = with an array of attachment references or streams in fully parsed out form = in java. Please help Thanks in advance Ashish Sharma