Results 1 to 2 of 2
Thread: error in reading mail contents
- 08-21-2008, 08:04 PM #1
Member
- Join Date
- Aug 2008
- Posts
- 8
- Rep Power
- 0
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.
thanks
- 08-22-2008, 12:14 AM #2
The text of that message looks like an object of type: MimeMultipart is being returned by getContent()the out put
"avax.mail.internet.MimeMultipart@b1cd0"
Check the API doc for getContent() to see what it returns.
If it returns an object, you'll need to cast that object and you can then use its methods to get its contents.
Similar Threads
-
Javax.mail.MethodNotSupported Exception in java mail api
By namarc in forum Advanced JavaReplies: 2Last Post: 05-05-2008, 06:01 AM -
Reading file contents (BufferedReader)
By Java Tip in forum Java TipReplies: 0Last Post: 02-07-2008, 09:00 AM -
reading from a zip file, error
By Mr tuition in forum AWT / SwingReplies: 1Last Post: 01-16-2008, 12:39 AM -
Reading web contents
By javaplus in forum NetworkingReplies: 2Last Post: 11-29-2007, 10:28 AM -
Mail error
By orchid in forum New To JavaReplies: 1Last Post: 04-22-2007, 02:34 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks