cfexchangefolder

Lets you perform various actions on the mail folder, such as get folder information, find folders, or create, copy, modify, move, delete, and empty the contents of a folder.

  <cfexchangefolder action="" folderID="" connection="" name="">

 cfexchangefolder(action="", folderID="", connection="", name="");

This tag requires Adobe ColdFusion 10 and up.  Not supported on Lucee, etc.

Attribute Reference

action string
Required

The action to take.
Values:
  • getInfo
  • getExtendedInfo
  • findSubFolders
  • create
  • copy
  • delete
  • move
  • modify
  • empty

connection string
Required

The name of the connection to the Exchange server, as specified in the cfexchangeconnection tag.

uid string

(getInfo/getExtendedInfo) UID that is used to identify the folder in which the actions are performed.

name variableName

(getInfo/getExtendedInfo/findSubFolders) The name of the ColdFusion query variable that contains the returned information about the folder.

folderID string

(getInfo/getExtendedInfo/findSubFolders/delete/modify/empty) UID that is used to identify the folder in which the actions are performed.

folderPath string

(getInfo/getExtendedInfo) Full path to the folder where the action has to be performed.

pathDelimiter string
Default: /

(getInfo/getExtendedInfo) Lets you specify the delimiter that is used to separate the folders.

result variableName

(create/copy/move) The name of a query variable that contains the result returned from the exchange server when one of the action is performed.

destinationFolderID string

(copy/move) A case-sensitive Exchange UID value that uniquely identifies the destination folder.

sourceFolderID string

(copy/move) The UID that is used to identify the folder from which you copy or move folders to the destination folder.

deleteType string
Default: moveToDeletedItems

(delete/move) - hardDelete: Removes a folder permanently from the Exchange server.
- softDelete: Moves a folder to the dumpster in Exchange server, if dumpster is enabled.
- moveToDeletedItems: Moves a folder to the deleted items folder.
Values:
  • hardDelete
  • softDelete
  • moveToDeletedItems

deleteSubFolders boolean
Default: false

(empty) If true, deletes the subfolder.

folder string

(create/modify) A struct that contains the required information of the folder that has to be created or modified, such as display name and folder class.

Examples
Sample code using the cfexchangefolder tag

Gets the extended information for the Inbox folder.

<cfexchangeconnection action="open" username="conv" password="Password" server="IP_Address" serverversion="2010" connection="conn1">
<cfexchangefolder action="getextendedinfo" connection="conn1" name="result" folderpath="Inbox">
<cfdump var="#result#">

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub