Whatever message this page gives is out now! Go check it out!
delete
<cfexchangemail
required
action = "delete"
uid = "message UID,message UID,..."
optionalaccess_token="token"
connection = "connection ID"
folder = "Exchange folder path">
deleteAttachments
<cfexchangemail
required
action = "deleteAttachments"
uid = "message UID"
optional
connection = "connection ID">
folder = "Exchange folder path">
get
<cfexchangemail
required
action = "get"
name = "query identifier"
optional
connection = "connection ID"
folder = "Exchange folder path">
folderID = "Exchange folder UID"
<cfexchangefilter name = "filter type" value = "filter value">
<cfexchangefilter name = "filter type" value = "filter value">
...
</cfexchangemail>
getAttachments
<cfexchangemail
required
action = "getAttachments"
name = "query identifier"
uid = "message UID"
optional
attachmentPath = "directory path"
connection = "connection ID"
folder = "Exchange folder path"
generateUniqueFilenames = "no|yes">
getMeetingInfo
<cfexchangemail
required
action = "getMeetingInfo"
meetingUID = "meeting UID"
name = "query identifier"
optional
connection = "connection ID"
mailUID = "message UID">
move
<cfexchangemail
required
action = "move"
destinationFolder = "Exchange folder path"
optional
connection = "connection ID"
folder = "Exchange folder path">
folderID = "Exchange folder UID"
<cfexchangefilter name = "filter type" value = "filter value">
<cfexchangefilter name = "filter type" value = "filter value">
...
</cfexchangemail>
set
<cfexchangemail
required
action = "set"
message = "#structure with values to set#">
uid = "message UID">
optional
connection = "connection ID"
folder = "Exchange folder path">
folderID = "Exchange folder UID"Attribute | Action | Req/Opt | Default | Description |
action | all | Required | The action to take. Must be one of the following values:
| |
| access_token | Optional | An oauth access token built with Microsoft Graph API scopes that is required to connect with exchange online. | ||
attachmentPath | getAttachments | Optional | The filepath of the directory in which to put the attachments. If the directory does not exist, ColdFusion creates it. Note: 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. | |
connection | all | Optional | The name of the connection to the Exchange server, as specified in the cfexchangeconnection tag. If you omit this attribute, create a temporary connection by specifying cfexchangeconnection tag open action attributes in the cfexchangecalendar tag. | |
destinationFolder | move | Required | The forward slash delimited path, relative to the root of the mailbox, of the folder to which to move the message or messages. | |
folder | all except getMeetingInfo | Optional | The forward slash delimited path, relative to the root of the mailbox, of the folder that contains the message or messages. The cfexchangemail tag looks in the specified folder only, and does not search subfolders. For the get and move actions specifying a cffexchangefilter child tag with a name="folder" attribute is equivalent to setting this attribute, and takes precedence over this attribute's value. If you omit this attribute, or for get and move actions, if you do not use the corresponding cfexchangefilter setting, Exchange looks in the top level of the Inbox. | |
folderID | __ get, move, set | Optional | A case-sensitive Exchange UID value that uniquely identifies the folder. If not specified, folder is used. If either folder or folderID are not specified, the inbox is used as the default folder to perform the operation. | |
generateUnique Filenames | getAttachments | Optional | no | A Boolean value that specifies whether to generate unique filenames if multiple attachments have the same filenames. If two or more attachments have the same filename and this option is yes, ColdFusion appends a number to the filename body (before the extension) of any conflicting filenames. Thus, if three attachments have the name myfile.txt, ColdFusion saves the attachments as myfile.txt, myfile1.txt, and myfile2.txt. |
mailUID | getMeetingInfo | Optional | The case-sensitive UID of the mail message that contains the meeting request, response, or cancellation notification. Use this attribute if there are multiple messages about a single meeting. | |
meetingUID | getMeetingInfo | Required | The case-sensitive UID of the meeting for which you received the notification. | |
message | set | Required | A reference to a structure that contains the properties to be set and their values. Specify this attribute in number signs (#). For more information on the message structure, see Usage. | |
name | getgetAttachmentsget MeetingInfo | Required | The name of the ColdFusion query variable that contains the returned mail messages or the retrieved information about the attachments or meeting. For more information on the returned data, see Usage. | |
serverVersion | Optional | 2007 | Specifies the Microsoft Exchange Server version. The values are:
| |
uid | deletegetAttachmentsset | Required | 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 deleteAttachments, getAttachments, and set actions allow only a single UID value. |
Column | Description |
BCC | A comma-delimited list of Exchange user IDs or web e-mail. |
CC | A comma-delimited list of Exchange user IDs or web e-mail addresses. |
Folder | The forward slash delimited path from the root of the Exchange mailbox to the mail folder containing the message. |
FromID | An Exchange user IDs or web e-mail addresses. |
HasAttachment | A Boolean value that indicates whether the message has at least one attachment. |
HTMLMessage | A string containing a HTML-formatted version of the message. |
IsRead | A Boolean value. |
Message | A string with a plain-text version of the message contents. |
MessageType | One of the following strings:
|
MeetingResponse | If the message type is Meeting_response, this column contains the response code as one of the following strings: Accept, Decline, or Tentative. This field is not used for other message types. |
MeetingUID | If the message type is Meeting_Cancel, Meeting_request, or Meeting_response this column contains the UID of the calendar event for which this message was sent. Use this value in the cfexchangecalendar tag to respond to a request. This field is not used for the Mail message type. |
Sensitivity | One of the following strings:
|
Subject | A string. |
TimeReceived | A ColdFusion date-time object. |
TimeSent | A Coldfusion date-time object. |
ToId | A comma-delimited list of Exchange user IDs or web mail IDs. |
UID | The Exchange UID of the message. |
Column name | Description |
attachmentFileName | The filename of the attachment. |
attachmentFilePath | The absolute path of the attachment file on the server. If you omit the attachmentPath attribute, this column contains the empty string. |
CID | The content-ID of the attachment. Used in HTML img tags to embed images in a message. |
mimeType | The MIME type of the attachment, such as text/html. |
isMessage | A Boolean value that specifies whether the attachment is a message. |
size | The attachment size in bytes. |
attachmentpath = "ram:///path" |
Field | Description |
AllDayEvent | A Boolean value that indicates whether this is an all day event. |
Duration | The duration of the event in minutes. |
EndTime | The end time of the event, in ColdFusion ODBC date-time format. |
From | The mail ID of the person who sent the meeting notification. |
HasAttachment | A Boolean value that indicates whether this event has attachments. |
Importance | One of the following values:
|
IsRecurring | A Boolean value that indicates whether this event repeats. |
Location | A string that specifies the location of the event. |
MeetingUID | The UID of the event in the calendar. |
Message | A string that contains a message about the event. |
OptionalAttendees | A comma-delimited list of mail IDs. |
Organizer | A string. This value is not necessarily an Exchange ID or e-mail address. |
Reminder | The time, in minutes before the event, at which to display a reminder message. |
RequiredAttendees | A comma-delimited list of mail IDs. |
Resources | A comma-delimited list of mail IDs for Exchange scheduling resources, such as conference rooms and display equipment. |
Sensitivity | One of the following values:
|
StartTime | The start time of the event, in ODBC date-time format. |
Subject | A string describing the event subject. |
TimeReceived | The time the message was received, in ODBC date-time format. |
UID | The UID of the message that contains the event notification. |
Key name | Valid values |
IsRead | yes, no |
Importance | high, normal, low |
Sensitivity | normal, company-confidential, personal, private |
<!--- Index for message attachement directory ---> <cfset i=1> <!--- Dates for date range ---> <cfset rightNow = Now()> <cfset lastWeek = DateAdd("d","-7", rightNow)> <cfexchangeconnection action="open" username ="#user1#" password="#password1#" server="#exchangeServerIP#" connection="testconn1"> <cfexchangemail action="get" folder="Inbox " name="weeksMail" connection="testconn1"> <cfexchangefilter name="FromID" value="docuser2"> <cfexchangefilter name="TimeSent" from="#lastWeek#" to="#rightNow#"> </cfexchangemail> <cfloop query="weeksMail"> <cfif weeksmail.HasAttachment> <cfexchangemail action="getAttachments" connection="testconn1" folder="Inbox/MailTest" uid="#weeksmail.uid#" name="attachData" attachmentPath="C:\temp\cf_files\attachments\msg_#i#" generateUniqueFilenames="yes"> <cfoutput> Message ID #weeksmail.uid# attachments are in the directory C:\temp\cf_files\attachments\Msg_#i#<br /> <br /> Message information:<br /> Subject: #weeksmail.Subject#<br /> Sent: #dateFormat(weeksmail.TimeSent)#<br /> From: #weeksmail.FromID#<br /> <br /> Attachments<br /> <cftable query="attachData" colheaders="yes"> <cfcol header="File Name" text="#attachmentFilename#"> <cfcol header="Size" text="#size#"> <cfcol header="MIME type" text="#mimeType#"> </cftable> </cfoutput> <cfset i++> </cfif> </cfloop> <cfexchangeconnection action="close" connection="testconn1"> |