Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating MS Exchange Calendar Appointments in ASP

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
is it possible to create an exchange/outlook calendar appointment email in an ASP script? The ones that you can accept/decline and it's got details of other attendees plus other info.

Thanks

E.
 
I had hoped somebody was going to reply to you emozley as I would like to see this myself.

I did a lot of reading and know that it CAN be done but no info on how to do it. There are products out there to let you tie into the exchange server but I would think it can be done otherwise.
I wanted to do the same thing for reading/writing calendar data but finally gave up and wrote my own calendar system that mimics the Outlook calendar (Man that was tough, still working on it actually).


Paranoid? ME?? WHO WANTS TO KNOW????
 
emozley,

The way this could be done is through adding a custom message part and appropriate MIME headers and creating a vcalendar message part - if you view the source of the email it will have something like this in it (as well as other message parts):

Code:
Content-class: urn:content-classes:calendarmessage
Content-Type: text/calendar;
	method=REQUEST;
	name="meeting.ics"
Content-Transfer-Encoding: 8bit

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft CDO for Microsoft Exchange
VERSION:2.0
BEGIN:VTIMEZONE
TZID:(GMT) Greenwich Mean Time/Dublin/Edinburgh/London
X-MICROSOFT-CDO-TZID:1
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T010000
TZOFFSETFROM:+0000
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20050920T183215Z
DTSTART;TZID="(GMT) Greenwich Mean Time/Dublin/Edinburgh/London":20050920T0
 00000
SUMMARY:test
UID:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE; CN="example@example.com": MAILTO:example@example.com
ORGANIZER;CN="example person":MAILTO:example@example.com
LOCATION:
DTEND;TZID="(GMT) Greenwich Mean Time/Dublin/Edinburgh/London":20050921T000
 000
DESCRIPTION:\N
SEQUENCE:0
PRIORITY:5
CLASS:
CREATED:20050920T183205Z
LAST-MODIFIED:20050920T183205Z
STATUS:CONFIRMED
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-CDO-INTENDEDSTATUS:FREE
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-2121212121
END:VEVENT
END:VCALENDAR

You will need to use the CDOSYS object and as part of the message configuration use
.BodyPart.AddBodyPart to create a new part
and
.ContentClass = "urn:content-classes:calendarmessage"
.ContentMediaType = "text/calendar;
method=REQUEST;
name=""meeting.ics""; charset=""utf-8"""
to set the type of content etc (or similar)

This should create the MIME wrapper for the content (which will look like the above from BEGIN:VCALENDAR to END:VCALENDAR)

I've not tested this, so it'll probably need tweaking etc - but should get you started in the general direction.


theniteowl,

I think you are after something a little different (a calendar view, rather than an invite) - this link may help you: and this:

both of you may find this site useful:


Although not a definitive answer, I hope it helps move things in the right direction.

Good luck.....

A smile is worth a thousand kind words. So smile, it's easy! :)
 
Actually, my need would have been reading and creating calendar items as well as sending out appointment/meeting emails.

I have tried playing with some scripts that connect to the exchange server but always run into problems with the login.
I do not have the ability to change web server permissions or to setup accounts on the exchange server.

Any chance you have a sample script showing how to accomplish a login with a fixed account/password?
None of the sample code I have found worked on my setup.
Trying Microsoft's sample code on the first link you supplied would get me as far as reading folder names and identifying the Public Folders folder but when it began searching for the specified sub folder it would fail with logon errors.


Paranoid? ME?? WHO WANTS TO KNOW????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top