class MimeMessageUtils {

    public List<Header> toHeaderList() throws MessagingException {
        ImmutableList.Builder<Header> headers = ImmutableList.builder();
        Enumeration<Header> allHeaders = message.getAllHeaders();
        while (allHeaders.hasMoreElements()) {
            headers.add(allHeaders.nextElement());
        }
        return headers.build();
    }

    public  MimeMessageUtils(MimeMessage message);

}