@Test void serviceShouldNotModifyMailWhenNotMultipart(TemporaryFolder temporaryFolder) throws MessagingException, IOException { Mailet mailet = initMailet(temporaryFolder); MimeMessageBuilder message = MimeMessageBuilder.mimeMessageBuilder() .setSubject("test") .setText("simple text"); MimeMessageBuilder expectedMessage = MimeMessageBuilder.mimeMessageBuilder() .setSubject("test") .setText("simple text"); Mail mail = FakeMail.fromMessage(message); Mail expectedMail = FakeMail.fromMessage(expectedMessage); mailet.service(mail); assertThat(mail) .usingRecursiveComparison() .ignoringFields("msg") .isEqualTo(expectedMail); assertThat(mail.getMessage().getContent()).isEqualTo("simple text"); }
@Override public void service(Mail mail) throws MailetException { MimeMessage message = getMessageFromMail(mail); if (isMultipart(message)) { processMultipartPartMessage(message, mail); } }
StripAttachment extends GenericMailet { @Override public void service(Mail mail) throws MailetException { MimeMessage message = getMessageFromMail(mail); if (isMultipart(message)) { processMultipartPartMessage(message, mail); } } }
StripAttachment extends GenericMailet { @Override public void service(Mail mail) throws MailetException { MimeMessage message = getMessageFromMail(mail); if (isMultipart(message)) { processMultipartPartMessage(message, mail); } }  }
StripAttachment extends GenericMailet { @Override public void service(Mail mail) throws MailetException { MimeMessage message = getMessageFromMail(mail); if (isMultipart(message)) { processMultipartPartMessage(message, mail); } }  @Override void init(); @Override void service(Mail mail); @Override String getMailetInfo(); }
StripAttachment extends GenericMailet { @Override public void service(Mail mail) throws MailetException { MimeMessage message = getMessageFromMail(mail); if (isMultipart(message)) { processMultipartPartMessage(message, mail); } }  @Override void init(); @Override void service(Mail mail); @Override String getMailetInfo(); static final String PATTERN_PARAMETER_NAME; static final String NOTPATTERN_PARAMETER_NAME; static final String MIMETYPE_PARAMETER_NAME; static final String ATTRIBUTE_PARAMETER_NAME; static final String DIRECTORY_PARAMETER_NAME; static final String REMOVE_ATTACHMENT_PARAMETER_NAME; static final String DECODE_FILENAME_PARAMETER_NAME; static final String REPLACE_FILENAME_PATTERN_PARAMETER_NAME; static final String REMOVE_NONE; static final String REMOVE_ALL; static final String REMOVE_MATCHED; static final AttributeName REMOVED_ATTACHMENTS; static final AttributeName SAVED_ATTACHMENTS; static final boolean DECODE_FILENAME_DEFAULT_VALUE; }