for (int i = 0; i < count; i++)
content.append(getContentFromHTML(mp.getBodyPart(i)));
} else if (p.isMimeType("text/html")) {
HtmlParser parser = new HtmlParser();
Metadata met = new Metadata();
TextContentHandler handler = new TextContentHandler(
new BodyContentHandler());
parser.parse(new ByteArrayInputStream(((String) p.getContent())
.getBytes()), handler, met);
content.append(handler.toString());
} else {
Object obj = p.getContent();
if (obj instanceof Part)
content.append(getContentFromHTML((Part) p.getContent()));
}