Posted By:
Andreas_Henningsson
Posted On:
Wednesday, March 13, 2002 07:52 AM
Hi! If a MultiPart contains a bodypart with a mimetype message/*. This body part contains several attachment. How can I get them, in order to check if these attachments should be removed? I whould like to get a new MultiPart object with these attachment. E.g. of code: for(int i=0; i BodyPart body = multipartBody.getBodyPart(i); if(body.isMimeType("message/*")){ WHAT TO DO HERE!!! } if(mimeBodyhasToBeRemoved(multipartBody.getBodyPart(i))){ System.out.println("Should remove bodypart at index: "+ i); multipartBody.removeBodyPart(i); i--; modified = true; } else System.out.println("S
More>>
Hi!
If a MultiPart contains a bodypart with a mimetype message/*. This body part contains several attachment.
How can I get them, in order to check if these attachments should be removed?
I whould like to get a new MultiPart object with these attachment.
E.g. of code:
for(int i=0; i
BodyPart body = multipartBody.getBodyPart(i);
if(body.isMimeType("message/*")){
WHAT TO DO HERE!!!
}
if(mimeBodyhasToBeRemoved(multipartBody.getBodyPart(i))){
System.out.println("Should remove bodypart at index: "+ i);
multipartBody.removeBodyPart(i);
i--;
modified = true;
}
else
System.out.println("Should not remove first bodypart!");
}
<<Less