Whatever message this page gives is out now! Go check it out!

cfimapfilter

Last update:
May 18, 2026

Description

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

History

ColdFusion 11: Added this tag.

Category

Syntax

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

OR 

<cfimapfilter 
name = "filter type" 
from = "date/time" 
to = "date/time">
Note:
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.

See also

cfimapGetting Exchange items and attachments in the Developing ColdFusion Applications

Attributes

Attribute
Req/Opt
Default
Description
name
Required
The type of filter to use. The supported filters in ColdFusion are:
NamePossible AttributesPossible Values
SubjectValueString to search in Subject
FromValueFrom ID
ToValueRecepient ID
FlagValue
Flag valueDescription
ANSWEREDMessages with the Answered flag set.
DELETEDMessages with the Deleted flag set.
DRAFTMessages with the Draft flag set.
NEWMessages with the New flag set.
FLAGGEDMessages with the Flagged flag set.
RECENTMessages with the Recent flag set.
OLDMessages with the Old flag set.
SEENMessages that have the Seen flag set.
UNANSWEREDMessages that do not have the Answered flag set.
UNDELETEDMessages that do not have the Deleted flag set.
UNDRAFTMessages that do not have the Draft flag set.
UNSEENMessages that do not have the Seen flag set.
UNFLAGGEDMessages that do not have the Flagged flag set.
TimeReceivedFrom,ToStart and End date for Time Received
TimeSentFrom,ToStart and End date for Time Sent
from
Optional
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
Optional
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
Optional
The filter value for all filters that do not take a date or time range. Cannot be used with the from and to attributes.ColdFusion generates an error if you specify this attribute with empty contents. Therefore, you cannot use the empty string to search for empty values.

If you set this attribute to the empty string ("" ), ColdFusion searches for entries where the specified field is empty.

Example

<cfimap action="getall" 
connection = "imapConnection" 
name = "emailTable" 
>

<cfimapfilter name="subject" value="meeting">

</cfimap>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page