This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes multiPart.getBodyPart(i) does NOT read in correct order! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "multiPart.getBodyPart(i) does NOT read in correct order!" Watch "multiPart.getBodyPart(i) does NOT read in correct order!" New topic
Author

multiPart.getBodyPart(i) does NOT read in correct order!

Shajid Johnny
Ranch Hand

Joined: May 15, 2010
Posts: 34
Dear members,
I am trying to read email and if that email contains any Multipart content, then I want to do some stuff with them.

Here is my code snippet:



the mail content has 3 images in such an order: image001.png is in the first column of a table, image002.png is in the second column of a table, and image003.png is in the third column of a table.
if I print the mailContent- it prints the html of the mail content where the <img src="" > tags are in the order that I mentioned.

but when I print the fileName in method processPart- it DOES NOT print in the proper order. rather it prints

image001
image003
image002

or sometimes in different order!

I am puzzled here!

does not the loop reads the Multipart contents in the proper order? or am I missing something?

thanks in advance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiPart.getBodyPart(i) does NOT read in correct order!
 
Similar Threads
Reading mail content
How can I download emails with attachments from Gmail with java programing..(error occur)
Java Mail receive Problem
Display Word attachments
JavaMail installation