我将mime4j jar添加到我的Android项目中,但对于这段代码,Eclipse不允许编写。我的意思是没有属性或其他属于mime4j jar的东西。
public static Part findFirstPartByMimeType(Part part, String mimeType)
throws MessagingException {
if (part.getBody() instanceof Multipart) { // It says there is no getBody
Multipart multipart = (Multipart)part.getBody();
for (int i = 0, count = multipart.getCount(); i < count; i++) {
BodyPart bodyPart = multipart.getBodyPart(i);
Part ret = findFirstPartByMimeType(bodyPart, mimeType);
if (ret != null) {
return ret;
}
}
}
或者无论如何接收邮件正文与mime4j?