Working with meeting notices and requests



Your mailbox gets a meeting notice when someone takes any of the following actions:

  • Sends you a meeting request

  • Cancels a meeting in your calendar

  • Responds to a meeting request that you sent and tells Exchange to notify you

The information provided by the cfexchangemail tag with the get action does not provide detailed information about meeting. It only includes the following meeting-related information:

  • The event UID

  • The type of message type: a meeting request, response, or cancellation

  • If the message is a response to a meeting request, an indication whether the meeting was accepted, declined, or tentatively accepted

Also, a meeting request does not appear in your calendar (so you cannot get detailed information about it using the cfexchangecalendar tag) until you accept it.

To get detailed information about a meeting message, use the cfexchangemail tag with the getMeetingInfo action. After getting the information, you can take the necessary action, such as using an cfexchangecalendar tag with the response action to accept or decline a meeting request.

Get meeting message details and respond to meeting requests

  1. Get the mail messages that contain the meeting notifications by using a cfexchangemail tag with an action attribute value of get and a cfexchangefilter child tag with the following attributes:

    • A name attribute with a value MessageType

    • A value attribute with a value of Meeting, Meeting_Request, Meeting_Response, or Meeting_Cancel. A value of Meeting gets all meeting notifications.

    You can use additional cfexchangefilter tags to further limit the messages you get.

    When the cfexchangemail tag completes processing, the MeetingUID column of the structure specified by the cfexchangemail tag name attribute contains the UIDs of the meetings.

  2. For each meeting, get the information about the meeting by using a cfexchangemail tag with the following attributes:

    • An action attribute value of getMeetingInfo.

    • A meetingUID attribute value with the value from the MeetingUID column of the structure specified by the cfexchangemail tag name attribute.

    • (Optional) A mailuid attribute with the UID of the message that contained the meeting notification. Use this attribute to identify a specific message if the Inbox contains multiple messages about a single meeting.

  3. Use the information returned in step 2 in application-specific logic to determine the required messages and actions. For example, you could display all meeting requests in a form that lets a user submit a response to each message.

  4. To respond to a meeting request, use the cfexchangecalendar tag with an action value of respond and set the following the attributes:

    • Set the uid attribute to the Meeting UID you received in step 2. Do not use the Message UID.

    • Specify a responseType value of accept, decline, or tentative.

    • (Optional) Specify a notify value of true (the default value) or false to control whether the event owner receives a meeting response message.

    • If the owner receives a notification, you can also specify a message attribute with a text message that is included in the response.

The following example shows how you can use this process. It displays all meeting invitations in the Inbox and lets the user respond to each request and send a message with the response:

<cfexchangeconnection 
    action="open" 
    username ="#user2#" 
    password="#password2#" 
    server="#exchangeServerIP#" 
    connection="conn1"> 
 
<cfif isDefined("Form.Submit")> 
 
<!--- When the form has been submitted, send the responses. ---> 
    <cfloop index="k" from="1" to="#Form.responses#"> 
        <cfset resp = Form["response" & k] > 
        <cfset msg = Form["respMessage" & k] > 
        <cfset msguid = Form["UID" & k] > 
        <cfexchangecalendar action="respond" connection="conn1" 
            uid="#msguid#" responseType="#resp#" message="#msg#"> 
        <cfoutput><h4>Response #k# sent!</h4></cfoutput> 
    </cfloop> 
 
<cfelse> 
    <!--- Get all messages with meeting Requests. ---> 
    <cfexchangemail action="get" name="requests" connection="conn1"> 
        <cfexchangefilter name="MessageType" value="Meeting_Request"> 
    </cfexchangemail> 
 
    <!--- Get the meeting request data. ---> 
    <cfloop query="requests"> 
        <cfexchangemail action="getmeetinginfo" connection="conn1"  
            name="meeting" meetinguid="#MeetingUID#"> 
        <cfset meetingData[requests.currentrow]=meeting> 
    </cfloop> 
 
    <!--- Display the invitation data in a form. ---> 
    <cfform name="bar"> 
        <cfloop index="j" from="1" to="#ArrayLen(meetingData)#"> 
            <cfoutput> 
                <h3>Meeting Request #j#</h3> 
                Subject: #meetingData[j].Subject# <br /> 
                Sensitivity: #meetingData[j].Sensitivity# <br /> 
                Organizer: #meetingData[j].Organizer# <br />  
                All Day?: #meetingData[j].AllDayEvent# <br /> 
                Day: #DateFormat(meetingData[j].StartTime)#&nbsp;&nbsp; 
                Starts: #TimeFormat(meetingData[j].StartTime)#&nbsp;&nbsp; 
                Ends: #TimeFormat(meetingData[j].EndTime)# <br /> 
                Duration: #meetingData[j].Duration# <br /> 
                Location: #meetingData[j].Location# <br /> 
                Message: #meetingData[j].Message# <br /> 
            </cfoutput> 
             
            <!--- Specify the response to this invitation. ---> 
            <h4>response:</h4> 
            <cfinput type="radio" checked name="response#j#" value="accept"> 
                Accept 
            <cfinput type="radio" name="response#j#" value="decline">Decline 
            <cfinput type="radio" name="response#j#" value="tentative">Tentative 
            <br /> 
            <cftextarea name="respMessage#j#" label="Message (optional)" 
                width="300" height="200" /> 
            <cfinput type="hidden" name="UID#j#" 
                value="#meetingData[j].MeetingUID#"> 
            <hr /> 
        </cfloop> 
        <cfinput type="hidden" name="responses" 
            value="#ArrayLen(meetingData)#"> 
        <cfinput type="Submit" name="submit" value="Submit"> 
    </cfform> 
 
</cfif> 
 
<cfexchangeconnection 
    action="close" 
    connection="conn1">

For an example that gets information about all declined meeting messages in the Inbox and all its subfolders, see the example in Getting and using folder names.