docs: @Override
      public String listMailsForUserHTML(String pEmail) {
          GreenMailUser user = managers.getUserManager().getUserByEmail(pEmail);
          if (null == user) {
              return " No such user for email " + pEmail;
          }
          StringBuilder builder = new StringBuilder("<table>");
          try {
              MailFolder mailFolder = managers.getUserManager().getImapHostManager().getInbox(user);
              builder.append("<caption>").append(mailFolder.getMessageCount())
                      .append(" Mails for ").append(pEmail).append("</caption>");
              builder.append(
                      "<tr><th>From</th><th>Subject</th><th>Received date</th><th>Content</th></tr>");
              for (StoredMessage msg : mailFolder.getMessages()) {
                  MimeMessage mimeMessage = msg.getMimeMessage();
                  builder.append("<tr>");
                  builder.append("<td>").append(
                          Arrays.toString(mimeMessage.getFrom())).append("</td>");
                  builder.append("<td>").append(mimeMessage.getSubject()).append("</td>");
                  builder.append("<td>")
                          .append(null == mimeMessage.getReceivedDate()
                                  ? msg.getReceivedDate()
                                  : mimeMessage.getReceivedDate())
                          .append("</td>");
  
                  Object content = mimeMessage.getContent();
                  if (content instanceof MimeMultipart) {
                      MimeMultipart multipart = (MimeMultipart) content;
                      builder.append("<td>").append(multipart.getBodyPart(0).getContent()).append("</td>");
                  } else {
                      builder.append("<td>").append(mimeMessage.getContent()).append("</td>");
                  }
                  builder.append("</tr>");
              }
          } catch (IOException | MessagingException | FolderException e) {
              throw new IllegalStateException(e);
          }
          builder.append("</table>");
          return builder.toString();
      }