This ContentType String: application/octet-stream; charset=iso-8859-1; name=Lpex3_asdf_30.07.2011 05_10_00.txt Causes this error: javax.mail.internet.ParseException: Expected ';', got "05_10_00.txt" at javax.mail.internet.ParameterList.(ParameterList.java:280) at javax.mail.internet.ContentType.(ContentType.java:110) at de.kisters.kidsm.auto.location.MailLocation.treatMultiPartMessage(MailLocation.java:308) at de.kisters.kidsm.auto.location.MailLocation.loadItem(MailLocation.java:219) at de.kisters.kidsm.auto.location.MailLocation.retrieveItemsFiltered(MailLocation.java:852) at de.kisters.kidsm.auto.location.LocationBase.retrieveItemsFiltered(LocationBase.java:447) at de.kisters.kidsm.auto.location.LocationBase.transferItemsFilteredTo(LocationBase.java:671) at de.kisters.kidsm.auto.job.DistributionJob.executeTask(DistributionJob.java:100) at de.kisters.kidsm.auto.job.JobBase.run(JobBase.java:114) When trying to do this: String cType = attachementPart.getContentType(); ContentType contentType = new ContentType(cType); I'm trying to get the ContentType for this: if (contentType != null && contentType.getPrimaryType().equals("multipart")) ... Is there a different way for that?