Gets mail messages and attachments, deletes messages, and sets properties for messages on a Microsoft Exchange server.
The cfexchangemail tag performs mail actions on an Exchange server that you cannot do using the cfmail tag.

  <cfexchangemail meetinguid="" message="" name="" uid="">

 cfexchangemail(meetinguid="", message="", name="", uid="");

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

Attribute Reference

action string

The name to use for the JavaScript proxy class. (required)
  • get
  • getAttachments
  • getMeetingInfo
  • delete
  • deleteAttachments
  • move
  • set

attachmentPath string

The file path of the directory in which to put the attachments.
If the directory does not exist, ColdFusion creates it.
If you omit this attribute, ColdFusion does not save any attachments.
If you specify a relative path, the path root is the ColdFusion temporary directory, which is returned by the GetTempDirectory function. (optional)

connection variableName

The name of the connection to the Exchange server, as specified in the cfexchangeconnection tag.
If you omit this attribute, and you specify cfexchangeconnection tag attributes in this tag, ColdFusion creates a temporary connection. (optional)

folder string

The forward slash (/) delimited path, relative to the inbox, of the folder that contains the message or messages.
The cfechangemail tag looks in the specified folder only, and does not search subfolders.
If you omit this attribute, Exchange looks in the top level of the inbox. (optional)

generateUniqueFilenames boolean

A Boolean value specifying whether to generate unique file names if multiple attachments have the same file names.
Case "yes": 3x myfile.txt -> myfile.txt, myfile1.txt, and myfile2.txt. (optional, default=no)
  • true
  • false

mailUID string

The case-sensitive UID of the mail message that contains the meeting request, response, or cancellation notification.
You can use this attribute if there are multiple messages about a single meeting. (optional)

meetingUID string

The case-sensitive UID of the meeting for which you received the notification. (required)

message any

A reference to a structure that contains the properties to be set and their values.
You must specify this attribute in number signs (#). (required)

name string

The name of the ColdFusion query variable that will contain the returned mail messages or information
about the attachments that were retrieved. (required)

UID string

The case-sensitive UIDs of the messages on which to perform the action.
For the delete action, this attribute can be a comma delimited list of UID values.
The getAttachments and set actions allow only a single UID value. (required)

destinationfolder string

The forward slash (/) delimited path, relative to the root of the mailbox, of the folder to which to move the message or messages.

Sample code using the cfexchangemail tag

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

Fork me on GitHub