if (alternative != null) return alternative;
    private static MPartInfo getBodySubpart(MPartInfo base, boolean preferHtml) {        // go through top-level children, stopping at first text part we are interested in        MPartInfo alternative = null;        for (Iterator it = base.getChildren().iterator(); it.hasNext(); ) {            MPartInfo p = (MPartInfo) it.next();            boolean isAttachment = p.getDisposition().equals(Part.ATTACHMENT);            if (p.getContentType().match(CT_TEXT_HTML) && !isAttachment) {                if (preferHtml)                	return p;                else if (alternative == null)                    alternative = p;            } else if (p.getContentType().match(CT_TEXT_PLAIN) && !isAttachment) {                if (!preferHtml)                    return p;                else if (alternative == null)                    alternative = p;            } else if (p.getContentType().match(CT_MULTIPART_WILD)) {                if (alternative != null)                    return alternative;                MPartInfo subpart = getBodySubpart(p, preferHtml);                if (subpart != null)                    return subpart;            }        }        return alternative;    }