Hi,
I don't know why I'm getting the following exception while reading a mail with an attachment file(or even without it) from mail server
Exception in thread "main" javax.mail.MessagingException: Missing start boundary
at javax.mail.internet.MimeMultipart.parsebm<MimeMultipart.java:872)
at javax.mail.internet.MimeMultipart.parse<MimeMultipart.java:493)
at javax.mail.internet.MimeMultipart.getCount<MimeMultipart.java:240)
at GetParts.handleMultipart(GetParts.java:57)
at GetParts.main(GetParts.java:42)
The code which causing the above exception:
public static void handleMultipart(Multipart multipart)
throws MessagingException, IOException {
for (int i=0, n=multipart.getCount(); i<n; i++) {//this part causing the error
handlePart(multipart.getBodyPart(i));
}
}
)
The content type header is looking like:
Content-Type: multipart/mixed;
boundary="----=_Part_0_28171097.1262761649031"
Could anyone please tell me how can I end that exception?
Edited by: Hunky322 on 15 Jan, 2010 9:14 AM