Thanks Stan. 
The method getBodyContent() gives MIME message but I need the parsed MIME 
message. The message may have say images, attachments, text etc.. I just want 
to get the text(plain or html) part of the message.

Regards
------------------------------------
Jentu Jain | Datacert, Inc.

Why are major companies rapidly migrating to Passport?  Find Out Here



-----Original Message-----
From: Ioan Eugen Stan [mailto:[email protected]] 
Sent: Tuesday, March 06, 2012 3:45 PM
To: [email protected]
Subject: Re: Retrieve body of the message

Pe 06.03.2012 08:52, Jentu Jain a scris:
> Hi,
> When a message is moved into IMAP folder, how to retrieve the message text 
> only (no attachments only the mail body as text)?
>
> Regards
> ------------------------------------
> Jentu Jain | Datacert, Inc.
>
> Why are major companies rapidly migrating to Passport?  Find Out 
> Here<http://www.datacert.com/>
> [Description: 
> cid:[email protected]]<http://www.datacert.com/feed.xml>[
> Description: 
> cid:[email protected]]<http://twitter.com/datacert>
>
>


Hello Jentu,

The mailstore implementations for james provides a getBodyContent of type 
InputStream. This gets all the message. I think it's the IMAP processor's 
responsibility to parse (with mime4j) the message and give you access to the 
parts you need.

The IMAP command is FETCH with TEXT argument [1]. I don't know the status of 
it's implementation in James.

[1] http://tools.ietf.org/html/rfc3501#section-6.4.5

p.s. I may be wrong.

Cheers,
--
Ioan Eugen Stan
http://ieugen.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to