Adobe COLDFUSION 9 Manual page 1222

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
• The
attributes correspond to field names in the Exchange item records. The valid values for the
name
attributes depend on the type of item you are getting. For detailed lists of the valid values, see the corresponding tag
references in the CFML Reference.
• If the
attribute specifies a field that takes text or numeric information, you use the
name
the condition.
• If the
attribute specifies a field that takes a date, time, or date and time, you use the
name
specify the range. You can omit one of these attributes to specify an open-ended range, such as all dates up to and
including December 1, 2007.
• Date ranges are inclusive. The selected items include ones with the specified
• You cannot use the empty string as a
field has an empty value, get all entries and use a query of queries to filter the results to include only entries where
the field is empty.
• In fields that take text strings such as Message and or Subject, ColdFusion returns items that contain the exact
phrase that you specify in the
• When you use the
cfexchangemail
folder, ColdFusion gets items that are directly in the Inbox only and does not search any subfolders. For an example
of getting information from multiple folders, see
When ColdFusion gets the results, it creates the query object specified in the
populates each row with a single item such as a mail message. The query columns depend on the type of item. For
example, a mail message has
information on the returned structures, see the corresponding tag in the CFML Reference.
The query results for all types of items have two columns:
• A
column with the unique ID of the item. You use this value to specify the item when you delete, modify, or
UID
(for calendar entries) respond to it. You also use the UID value to get the item attachments.
• A
column with a Boolean value specifying whether the item has any attachments. If this field is
HasAttachments
true, you can use the
getAttachments
The following example gets the mail messages that were sent during the last week to the docuser1 user from any e-mail
address that includes adobe.com. To keep this code short, the example uses the
<cfset rightNow = Now()>
<cfset lastWeek = DateAdd("d","-7", rightNow)>
<cfexchangemail action="get" name="weeksMail"
username ="#user1#" password="#password1#"
server="#exchangeServerIP#">
<cfexchangefilter name="FromID" value="adobe.com">
<cfexchangefilter name="TimeSent" from="#lastWeek#" to="#rightNow#">
</cfexchangemail>
<cfdump var="#weeksMail#">
Getting item attachments
To get the attachments to an Exchange contact, event, message, or task, use a ColdFusion Exchange tag with a
action. Also specify the following information in the tag:
getAttachments
• The UID of the message that contains the attachment or attachments.
attribute to search for an empty value. To find entries where a particular
value
attribute.
value
tag, ColdFusion gets only items a single folder. If you include a filter for a
"Getting and using folder
and
fields, and a contact has
FromID
ToID
action to get the attachments.
Last updated 8/5/2010
attribute to specify
value
and
from
or
dates.
to
from
names" on page 1214.
attribute, if it does not exist, and
name
and
fields. For detailed
FirstName
LastName
tag to show the results.
cfdump
1217
name
attributes to
to

Advertisement

Table of Contents
loading

Table of Contents