error in reading mail contents
I am developing java mail application.i want to read mail from java E-mail server(JES).i used the method getcontent() like this
System.out.println(message[i].getContent()); but i am geting the out put
"avax.mail.internet.MimeMultipart@b1cd0" which is not the mail content.i tried message[i].WriteTo(System.out); but it is giving me all the unecessary content like
messae-id,message version,content-type,encoding-type,contern decsription.
but i don't want them. i want only the body and the attached file.So
please help me how to read it.