• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading The Email Body  RSS feed

ajay yaduwanshi
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a small issue in reading a body content of email forwarded from Yahoo and rediff mail service provider.
I am using below code snippet to read the body content of the forwarded mail.

private void readMessageContent(Message message) throws Exception {

Part messagePart = message;
Object content = messagePart.getContent();



In the above code in readMessageContent method I am passing message object which is assign to part interface when
I call the method getContent() it is just throwing null and I am not getting the exception printed on my console.

Note: When I received a mail, which has attachment and some body content. I am unable to process the body part.
Can any one provide me the code which can do
The above requirement.

Thanks in Advance.
[ January 17, 2008: Message edited by: Bear Bibeault ]
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!