@Test public void contentTransferEncodingOfAttachmentShouldBeTakenFromOriginalMessage() throws Exception { Mail mail = FakeMail.builder() .name("name") .mimeMessage(calendarMessage) .build(); mailet.service(mail); Multipart multipart = (Multipart)mail.getMessage().getContent(); int firstBodyPartIndex = 0; BodyPart firstBodyPart = multipart.getBodyPart(firstBodyPartIndex); assertThat(firstBodyPart.getHeader("Content-transfer-encoding")).containsExactly("8BIT"); }
@Override public void service(Mail mail) throws MessagingException { MimeMessage mimeMessage = mail.getMessage(); if (mimeMessage.isMimeType(TEXT_CALENDAR_TYPE)) { processTextBodyAsAttachment(mimeMessage); } }
TextCalendarBodyToAttachment extends GenericMailet { @Override public void service(Mail mail) throws MessagingException { MimeMessage mimeMessage = mail.getMessage(); if (mimeMessage.isMimeType(TEXT_CALENDAR_TYPE)) { processTextBodyAsAttachment(mimeMessage); } } }
TextCalendarBodyToAttachment extends GenericMailet { @Override public void service(Mail mail) throws MessagingException { MimeMessage mimeMessage = mail.getMessage(); if (mimeMessage.isMimeType(TEXT_CALENDAR_TYPE)) { processTextBodyAsAttachment(mimeMessage); } }  }
TextCalendarBodyToAttachment extends GenericMailet { @Override public void service(Mail mail) throws MessagingException { MimeMessage mimeMessage = mail.getMessage(); if (mimeMessage.isMimeType(TEXT_CALENDAR_TYPE)) { processTextBodyAsAttachment(mimeMessage); } }  @Override String getMailetInfo(); @Override void service(Mail mail); }
TextCalendarBodyToAttachment extends GenericMailet { @Override public void service(Mail mail) throws MessagingException { MimeMessage mimeMessage = mail.getMessage(); if (mimeMessage.isMimeType(TEXT_CALENDAR_TYPE)) { processTextBodyAsAttachment(mimeMessage); } }  @Override String getMailetInfo(); @Override void service(Mail mail);  }