[
https://issues.apache.org/jira/browse/NIFI-3992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16055257#comment-16055257
]
ASF GitHub Bot commented on NIFI-3992:
--------------------------------------
Github user ijokarumawak commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1867#discussion_r122894561
--- Diff:
nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/ConsumeEWS.java
---
@@ -304,6 +314,13 @@ protected void
fillMessageQueueIfNecessary(ProcessContext context) throws Proces
ExchangeService service = this.initializeIfNecessary(context);
boolean deleteOnRead =
context.getProperty(SHOULD_DELETE_MESSAGES).getValue().equals("true");
boolean markAsRead =
context.getProperty(SHOULD_MARK_READ).getValue().equals("true");
+ String includeHeaders =
context.getProperty(INCLUDE_EMAIL_HEADERS).getValue();
+ String[] headersList;
+ if(includeHeaders.equals("")){
+ headersList = new String[1];
+ headersList[0] = "*";
+ }
+ headersList = includeHeaders.split(",");
--- End diff --
```
if (!StringUtils.isEmpty(includeHeaders)) {
headersList = includeHeaders.split(",");
}
```
Would be simpler.
> ConsumeEWS May Generate Unusable Emails
> ---------------------------------------
>
> Key: NIFI-3992
> URL: https://issues.apache.org/jira/browse/NIFI-3992
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.2.0
> Reporter: Peter Wicks
> Assignee: Peter Wicks
> Priority: Minor
>
> If an email contains attachments, ConsumeEWS may generate emails where the
> attachments cannot be extracted.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)