if (ct.startsWith(CT_MULTIPART + '/')) {
if (ct.startsWith(CT_MULTIPART_PREFIX)) {
    public static MimePart getMimePart(MimePart mp, String part) throws IOException, MessagingException {        if (mp == null)            return null;        if (part == null || part.trim().equals(""))            return mp;        part = part.trim();        String[] subpart = part.split("\\.");        for (int i = 0; i < subpart.length; i++) {            int index = Integer.parseInt(subpart[i]);            if (index <= 0)                return null;            // the content-type determines the expected substructure            String ct = mp.getContentType().toLowerCase();            if (ct == null)                return null;            if (ct.startsWith(CT_MULTIPART + '/')) {                Object content = getMultipartContent(mp, ct);                if (content instanceof MimeMultipart && ((MimeMultipart) content).getCount() >= index) {                    BodyPart bp = ((MimeMultipart) content).getBodyPart(index - 1);                    if (bp instanceof MimePart) {                        mp = (MimePart) bp;                        continue;                    }                }            } else if (mp instanceof MimeMessage && index == 1 && i == subpart.length - 1) {                // the top-level part of a non-multipart message is numbered "1"                break;            } else if (ct.startsWith(CT_MESSAGE_RFC822)) {                Object content = getMessageContent(mp);                if (content instanceof MimeMessage) {                    if (mp instanceof MimeMessage) {                        // the top-level part of a non-multipart message is numbered "1"                        if (index != 1)                            return null;                    } else                    	i--;                    mp = (MimePart) content;                    continue;                }            }            return null;        }        return mp;    }