docs: void parseMimePart(MimePart part) throws MessagingException {
          final String body = GreenMailUtil.getBody(part);
          size = body.length();
  
          // Section 1 - Message Headers
          if (part instanceof MimeMessage) {
              try {
                  String[] subjects = part.getHeader("Subject");
                  if ((subjects != null) && (subjects.length > 0)) {
                      subject = subjects[0];
                  }
              } catch (MessagingException me) {
  //                if (DEBUG) getLogger().debug("Messaging Exception for getSubject: " + me);
              }
          }
          try {
              from = part.getHeader("From");
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getHeader(From): " + me);
          }
          try {
              sender = part.getHeader("Sender");
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getHeader(Sender): " + me);
          }
          try {
              replyTo = part.getHeader("Reply-To");
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getHeader(Reply To): " + me);
          }
          try {
              to = part.getHeader("To");
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getHeader(To): " + me);
          }
          try {
              cc = part.getHeader("Cc");
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getHeader(To): " + me);
          }
          try {
              bcc = part.getHeader("Bcc");
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getHeader(To): " + me);
          }
          try {
              inReplyTo = part.getHeader("In Reply To");
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getHeader(In Reply To): " + me);
          }
          try {
              date = part.getHeader("Date");
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getHeader(Date): " + me);
          }
          try {
              messageID = part.getHeader("Message-ID");
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getHeader(messageID): " + me);
          }
          String contentTypeLine = null;
          try {
              contentTypeLine = part.getContentType();
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getContentType(): " + me);
          }
          if (contentTypeLine != null) {
              decodeContentType(contentTypeLine);
          }
          try {
              contentID = part.getContentID();
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getContentUD(): " + me);
          }
          try {
              contentDesc = part.getDescription();
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getDescription(): " + me);
          }
          try {
              contentEncoding = part.getEncoding();
              // default value.
              if (contentEncoding == null) {
                  contentEncoding = "7BIT";
              }
          } catch (MessagingException me) {
  //            if (DEBUG) getLogger().debug("Messaging Exception for getEncoding(): " + me);
          }
  
          try {
  //            contentDisposition = part.getDisposition();
              contentDisposition = Header.create(part.getHeader("Content-Disposition"));
          } catch (MessagingException me) {
              if (log.isDebugEnabled()) {
                  log.debug("Can not create content disposition for part " + part, me);
              }
          }
  
          try {
              // TODO this doesn't work
              lineCount = GreenMailUtil.getLineCount(body);
          } catch (Exception e) {
              if (log.isDebugEnabled()) {
                  log.debug("Can not get line count for part " + part, e);
              }
          }
  
          // Recurse through any embedded parts
          if (primaryType.equalsIgnoreCase(MULTIPART)) {
              MimeMultipart container;
              try {
                  container = (MimeMultipart) part.getContent();
                  int count = container.getCount();
                  parts = new SimpleMessageAttributes[count];
                  for (int i = 0; i < count; i++) {
                      BodyPart nextPart = container.getBodyPart(i);
  
                      if (nextPart instanceof MimePart) {
                          SimpleMessageAttributes partAttrs = new SimpleMessageAttributes(null, receivedDate);
                          partAttrs.parseMimePart((MimePart) nextPart);
                          parts[i] = partAttrs;
  
                      }
                  }
              } catch (Exception e) {
                  if (log.isDebugEnabled()) {
                      log.debug("Can not recurse through multipart content", e);
                  }
              }
          } else if (primaryType.equalsIgnoreCase("message")) {
              if (secondaryType.equalsIgnoreCase("RFC822")) {
                  parts = new SimpleMessageAttributes[1];
                  try {
                      MimeMessage wrappedMessage = (MimeMessage) part.getContent();
                      if(log.isDebugEnabled()) {
                          log.debug("message type : " + wrappedMessage.getContentType());
                      }
                      parts[0] = new SimpleMessageAttributes(wrappedMessage, null);
                  } catch (Exception e) {
                      throw new IllegalStateException("Can not extract part for "+primaryType+"/"+secondaryType, e);
                  }
              } else {
                  log.warn("Unknown/unhandled subtype {} of message encountered.", secondaryType);
              }
          }
      }