Using ColdFusion CFMail to send Microsoft Outlook Appointment Request

CFMail , ColdFusion - Author:John Gag at 3:51 PM Add comments

I was asked to find a way to send a Microsoft Outlook Appointment Request email using ColdFusion cfmail tag.  I was very much in luck with ColdFusion 8.  Below is cfmail code I found that produces the outlook meeting request.

<cfmail to="test@test.com" from="youremail@test.com" subject="Test appointment" type="multipart">
<cfmailparam name="content-class" value="urn:content-classes:calendarmessage">
<cfmailparam name="content-type" value="text">
<cfmailparam name="method" value="request">
<cfmailparam name="charset" value="utf-8">
<cfmailparam name="content-transfer-encoding" value="7bit">
<cfmailpart type="text">
TEST TEST TEST
</cfmailpart>
<cfmailpart type="text/calendar">
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MINMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20080317T123000Z
DTEND:20080317T133000Z
LOCATION: Reno
TRANSP:OPAQUE
SEQUENCE:0
UID:0
DTSTAMP:20080303T140000Z
DESCRIPTION:Descriptive text here.\n
SUMMARY:Short summary here
PRIORITY:5
X-MICROSOFT-CDO-IMPORTANCE:1
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR
</cfmailpart>
</cfmail>

All you need to do is setup a simple input form and call the appropriate variables needed (recipient email, body of email, DTSTART, DTEND etc.).  For more information on how to create a vCalendar file check out the following link http://support.microsoft.com/kb/287625

7 responses to “Using ColdFusion CFMail to send Microsoft Outlook Appointment Request”

  1. Troy Says:
    I have a similar blog entry describing a UDF I wrote for generating an iCalendar file which could then be emailed. http://blog.webdh.com/index.cfm/2008/3/21/Generating-an-iCalendar-ics-file
  2. John Gag Says:
    @Troy - Cool, I will have to check that out
  3. Anthony Says:
    This builds an ICS file OK. Something is fishy though. When other applications send me a message with an ICS attached, my iphone will pop up and tell me there is an appointment. However this method doesnt do that. Anone have a fix for the seemless integration to the iphone? Other apps create ICS files that do this so I suppose it is possible.
  4. Dave Says:
    how does one make the user accept the meeting request ? Im truly baffled by how that part works ? any ideas ?
  5. John Gag Says:
    @Anthony - Sorry I do not know the answer to the iPhone problem. @Dave - I am not really sure what your question is?
  6. Jas Says:
    Very cool!! is there anyway I can adapt to get an accept response from the sender?
  7. John Gag Says:
    @Jas - I have not not tried that. Thats a good question. I would like to know how that goes if you figure it out.

Leave a Reply





Powered by Mango Blog. Design and Icons by N.Design Studio