Adobe COLDFUSION 9 Manual page 1219

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
sContact.BusinessAddress.Country=Form.country;
sContact.BusinessPhoneNumber=Form.businessPhone;
sContact.MobilePhoneNumber=Form.cellPhone;
sContact.BusinessFax=Form.fax;
sContact.Email1=Form.email;
</cfscript>
<!--- Create the contact in Exchange --->
<cfexchangecontact action="create"
username ="#user1#"
password="#password1#"
server="#exchangeServerIP#"
contact="#sContact#"
result="theUID">
<!--- Display a confirmation that the contact was added. --->
<cfif isDefined("theUID")>
<cfoutput>Contact Added. UID is#theUID#</cfoutput>
</cfif>
</cfif>
For another example of creating items, which creates a task, see
Getting Exchange items and attachments
You can get calendar events, contacts, mail messages, and tasks from the Exchange server. You can also get
attachments to these items.
Getting an exchange item and its attachments can require multiple operations.
• To get mail that is not directly in the Inbox, specify the path from the root of the mailbox to the mail folder, and
you can get items from only a single mail folder at a time. You can use the cfexchangeconnection tag to get the
names, paths, and sizes of all folders in a mailbox, and can use the results to iterate over the folders.
• To get an attachment to an item, you must first get the item, and then use the item UID to get its attachments.
• If an Exchange item contains a message with inline images, the images are available as attachments. You can get the
attachments, use the attachment CID to locate the image in the message, and display the image inline.
Note: The
getattachment
attachments, such as images. This problem occurs because some Exchange clients do not always set the CID values if
the attachments are sent inline.
Getting and using folder names
To get the names of folders in the mailbox, or the subfolders of a particular folder, use the cfexchangeconnection tag
with the
action. This action returns a query with a row for each subfolder. The query has three
getSubfolders
columns:
• folder name
• full path from the mailbox to the folder, including the Inbox
• folder size, in bytes
You can specify the folder whose subfolders you are getting and whether to recursively get all levels of subfolders.
action does not always populate the CID field for HTML mail that contains inline
Last updated 8/5/2010
"Using transient
connections" on page 1211.
1214

Advertisement

Table of Contents
loading

Table of Contents