for (MIMEPart part : related.getParts()) {
for (Object subpart : part.getAny()) {
if (subpart instanceof MIMEContentType) {
MIMEContentType content = (MIMEContentType) subpart;
if (partName.equals(content.getPart()))
return content.getType();
}
}
}
}