Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1229

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
<!--- Create a structure with a true IsRead field --->
<cfset changeValues.IsRead="true">
<!--- Open the connection. --->
<cfexchangeConnection
action="open"
username ="#user1#"
password="#password1#"
server="#exchangeServerIP#"
connection="conn1">
<!--- Get the mail in the Inbox that is at least two weeks old. --->
<cfexchangemail action="get" name="oldMail" connection="conn1">
<cfexchangefilter name="timeSent" from="01/01/2000"
to="#DateAdd("d","-14", Now())#">
</cfexchangemail>
<!--- Loop through the resulting oldMail query and set the IsRead indicator
to true. --->
<cfloop query="oldMail">
<cfexchangemail action="set"
connection="conn1"
message="#changeValues#"
uid="#oldMail.uid#">
</cfloop>
<!--- Close the connection. --->
<cfexchangeConnection
action="close"
connection="conn1">
Moving mail between folders
To move a one or more mail messages from one folder to another, use the
in the following code snippet, which moves all messages with the subject "Rams and Ewes" from the Unread folder in
the Inbox to the Sheep folder in the inbox.
<cfexchangemail action="move" connection="con1" folder="Inbox/Unread"
destinationfolder="Inbox/Sheep">
<cfexchangefilter name="subject" value="Rams and Ewes">
</cfexchangemail>
Deleting Exchange items and attachments
To delete an exchange item, use the ColdFusion Exchange tag with the
UID. Deleting the exchange item deletes all attachments
To delete only the attachments to an exchange item, use the ColdFusion Exchange tag with the
and specify the item UID,
deleteAttachments
This example deletes all meeting requests in the Inbox for meetings that have passed, but does not delete any requests
in folders in the Inbox. To delete requests in the Inbox, use a separate
information on accessing and using multiple folders, see
action
cfexchangemail
"Getting and using folder
Last updated 1/20/2012
tag
action, as shown
cfexchangemail
move
attribute of
and specify the item
delete
action
tag for each folder. For
names" on page 1214.
1224
attribute of

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents