Commit 02cfec5d by nilu

S34694741 # Client - Incoming Issues (raised by Client) #Email Ingest not working (quickly)

parent f3119510
...@@ -275,12 +275,20 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant ...@@ -275,12 +275,20 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
if(message.getAllRecipients() != null && message.getAllRecipients().length > 0) if(message.getAllRecipients() != null && message.getAllRecipients().length > 0)
{ {
tmpRecipient = ((InternetAddress) message.getAllRecipients()[0]).getAddress(); for(Address receipientAddress : message.getAllRecipients())
} {
tmpRecipient = ((InternetAddress)receipientAddress).getAddress();
if(StringUtils.subBlanks(tmpRecipient) != null) if(StringUtils.subBlanks(tmpRecipient) != null && tmpRecipient.contains("job"))
{ {
tmpJobId = getJobIdentifierFromEmail(tmpRecipient); tmpJobId = getJobIdentifierFromEmail(tmpRecipient);
if(tmpJobId != null && !tmpJobId.isEmpty() && StringUtils.isNumber(tmpJobId))
{
break;
}
}
}
} }
tmpEmailText = EmailFetcher.getText(message, new ArrayList<>()); tmpEmailText = EmailFetcher.getText(message, new ArrayList<>());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment