diff --git a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ExtractEmailAttachments.java b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ExtractEmailAttachments.java index c0496a7131..c2e24e4edb 100644 --- a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ExtractEmailAttachments.java +++ b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ExtractEmailAttachments.java @@ -22,7 +22,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.Collections; -import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -134,11 +133,6 @@ public class ExtractEmailAttachments extends AbstractProcessor { if (from == null) { throw new MessagingException("Message failed RFC-2822 validation: No Sender"); } - Date sentDate = originalMessage.getSentDate(); - if (sentDate == null) { - // Throws MessageException due to lack of minimum required headers - throw new MessagingException("Message failed RFC2822 validation: No Sent Date"); - } originalFlowFilesList.add(originalFlowFile); if (parser.hasAttachments()) { final String originalFlowFileName = originalFlowFile.getAttribute(CoreAttributes.FILENAME.key()); diff --git a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ExtractEmailHeaders.java b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ExtractEmailHeaders.java index 55b2b65ccf..54a43ba057 100644 --- a/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ExtractEmailHeaders.java +++ b/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ExtractEmailHeaders.java @@ -23,7 +23,6 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.Date; import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; @@ -178,11 +177,7 @@ public class ExtractEmailHeaders extends AbstractProcessor { if (from == null) { throw new MessagingException("Message failed RFC-2822 validation: No Sender"); } - Date sentDate = originalMessage.getSentDate(); - if (sentDate == null ) { - // Throws MessageException due to lack of minimum required headers - throw new MessagingException("Message failed RFC-2822 validation: No Sent Date"); - } else if (capturedHeadersList.size() > 0){ + if (capturedHeadersList.size() > 0){ Enumeration headers = originalMessage.getAllHeaders(); while (headers.hasMoreElements()) { Header header = (Header) headers.nextElement();