@Test public void toHeaderListShouldReturnMessageIdAndMimeVersionByDefault() throws Exception { assertThat( new MimeMessageUtils(MimeMessageBuilder.mimeMessageBuilder() .build()) .toHeaderList()) .extracting("name") .contains("Message-Id", "MIME-Version"); }
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(); }
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(); } }
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(); } MimeMessageUtils(MimeMessage message); }
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(); } MimeMessageUtils(MimeMessage message); Optional<String> subjectWithPrefix(String subjectPrefix); Optional<String> subjectWithPrefix(String subjectPrefix, Mail originalMail, String subject); String getMessageHeaders(); List<Header> toHeaderList(); }
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(); } MimeMessageUtils(MimeMessage message); Optional<String> subjectWithPrefix(String subjectPrefix); Optional<String> subjectWithPrefix(String subjectPrefix, Mail originalMail, String subject); String getMessageHeaders(); List<Header> toHeaderList();  }