User Guide Cancel

cfimapfilter

 

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

Name Possible Attributes Possible Values
Subject Value String to search in Subject
From Value From ID
To Value Recepient ID
Flag Value

 

Flag value Description
ANSWERED Messages with the Answered flag set.
DELETED Messages with the Deleted flag set.
DRAFT Messages with the Draft flag set.
NEW Messages with the New flag set.
FLAGGED Messages with the Flagged flag set.
RECENT Messages with the Recent flag set.
OLD Messages with the Old flag set.
SEEN Messages that have the Seen flag set.
UNANSWERED Messages that do not have the Answered flag set.
UNDELETED Messages that do not have the Deleted flag set.
UNDRAFT Messages that do not have the Draft flag set.
UNSEEN Messages that do not have the Seen flag set.
UNFLAGGED Messages that do not have the Flagged flag set.

 

TimeReceived From,To Start and End date for Time Received
TimeSent From,To Start 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>
<cfimap action="getall" connection = "imapConnection" name = "emailTable" > <cfimapfilter name="subject" value="meeting"> </cfimap>
<cfimap action="getall" 
connection = "imapConnection" 
name = "emailTable" 
>

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

</cfimap>

Get help faster and easier

New user?