cfimapfilter

Specifies filter parameters that control the actions of cfimap, get operations.

Two ways to use this tag: [name, value pair attributes] or [name, from, to ].


name = "filter type"
value = "filter value"

OR


name = "filter type"
from = "date/time"
to = "date/time"

 <cfimapfilter name="filter type" ... >

 cfimapfilter(name="filter type", ...);

This tag requires Adobe ColdFusion 11 and up. Not supported on Lucee, OpenBD, etc.

Attribute Reference for the cfimapfilter tag

name

Required: Yes
type of imap filter to use. TimeReceived and TimeSent must be used with the from/to attributes Values:
  • Subject
  • From
  • To
  • Flag
  • TimeReceived
  • TimeSent

from

Required: No
The start date or date/time combination of the range to use for filtering. Cannot be used with the value attribute. If you specify a from attribute without a to attribute, the filter selects for all entries on or after the specified date or time.
The value can be in any date/time format recognized by ColdFusion, but must correspond to a value that is appropriate for the filter type.

to

Required: No
The end date or date/time combination for the range used for filtering. Cannot be used with the value attribute. If you specify a to attribute without a from attribute, the filter selects for all entries on or before the specified date or time.
The value can be in any date/time format recognized by ColdFusion, but must correspond to a value that is appropriate for the filter type.

value

Required: No
Filter Value

Compatibility

ColdFusion:

Version 11+ You can specify this tag's attributes in an attributeCollection attribute whose value is a structure. Specify the structure name in the attributeCollection attribute and use the tag's attribute names as structure keys.

Examples sample code using the cfimapfilter tag


Adobe Example

<cfimap action="getall" 
 connection = "#REQUEST.connectionname#" 
 name = "queryname" 
 stoponerror = "#REQUEST.stoponerror#" >
 
 <cfimapfilter name="subject" value="filter">
 
</cfimap>

Fork me on GitHub