Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
ManifoldCF 2.6
-
None
Description
The email connector uses the standard email java class to search. There are some filter fields as "from, to, subject, body, date" but the date filter isn't working. The code line:
SearchTerm searchTerm = null; Iterator<Map.Entry<String,String>> it = findMap.entrySet().iterator(); while (it.hasNext()) { Map.Entry<String,String> pair = it.next(); findParameterName = pair.getKey().toLowerCase(Locale.ROOT); findParameterValue = pair.getValue(); if (Logging.connectors.isDebugEnabled()) Logging.connectors.debug("Email: Finding emails where '" + findParameterName + "' = '" + findParameterValue + "'"); SearchTerm searchClause = null; if (findParameterName.equals(EmailConfig.EMAIL_SUBJECT)) { searchClause = new SubjectTerm(findParameterValue); } else if (findParameterName.equals(EmailConfig.EMAIL_FROM)) { searchClause = new FromStringTerm(findParameterValue); } else if (findParameterName.equals(EmailConfig.EMAIL_TO)) { searchClause = new RecipientStringTerm(Message.RecipientType.TO, findParameterValue); } else if (findParameterName.equals(EmailConfig.EMAIL_BODY)) { searchClause = new BodyTerm(findParameterValue); } if (searchClause != null) { if (searchTerm == null) searchTerm = searchClause; else searchTerm = new AndTerm(searchTerm, searchClause); } else { Logging.connectors.warn("Email: Unknown filter parameter name: '"+findParameterName+"'"); } }
I think it should be filtered by date range.