Adobe COLDFUSION 9 Manual page 1220

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
You can use a folder path from the
folder that contains the mail message that requires action. If you do not specify a folder, the
searches only the top level of the Inbox for the message on which to act.
To perform operations on mail from multiple folders, including getting mail items or attachments, you can loop over
the entries in the query returned by the
generates a report of all declined meeting messages in the Inbox and all its subfolders.
<!--- Create a connection. --->
<cfexchangeConnection
action="open"
username ="#user2#"
password="#password2#"
server="#exchangeServerIP#"
connection="conn1">
<!--- Get the names and paths to all subfolders. --->
<cfexchangeconnection action="getSubfolders" connection="conn1"
name="folderInfo" folder="Inbox" recurse="yes">
<!--- Get the information from the Inbox top level.
The getSubfolders results do not include an Inbox row. --->
<cfexchangemail action="get" connection="conn1"
name="theResponses">
<cfexchangefilter name="MessageType" value="Meeting_Response">
</cfexchangemail>
<!--- Use a query of queries to select only the declined meetings. --->
<!--- You cannot use cfexchangefilter to filter for the meeting response type. --->
<cfquery dbtype="query" name="theResponses">
SELECT * FROM theResponses
WHERE MEETINGRESPONSE = 'Decline'
</cfquery>
<!--- Loop through the subfolders and get the meeting responses from each
folder. --->
<cfloop query="folderInfo">
<cfexchangemail action="get" connection="conn1"
name="#folderinfo.foldername#">
<cfexchangefilter name="folder" value="#folderinfo.folderpath#">
<cfexchangefilter name="MessageType" value="Meeting_Response">
</cfexchangemail>
<!--- Use the evaluate function to get the name of the folder. --->
<cfset meetingData=evaluate(folderinfo.foldername)>
<!--- Use a query of queries with a UNION clause to add this folder's
results to the theResponses query. --->
action in the
getSubfolders
action, as the following example shows. This example
getSubfolders
Last updated 8/5/2010
tag
cfexchangemail
folder
cfexchangemail
1215
attribute to specify the
tag

Advertisement

Table of Contents
loading

Table of Contents