1、Sending Outlook meeting requests without OutlookSending Outlook meeting requests without Outlook?I just wonder if it is possible to send Meeting Requests to people without having Outlook installed on the Server and using COM Interop (which I want to avoid on a server at all costs).We have Exchange 2
2、003 in a Windows 2003 Domain and all users are domain Users. I guess I can send round iCal/vCal or something, but I wonder if there is a proper standard way to send Meeting Requests through Exchange without Outlook?This is C#/.net if it matters.The way to send a meeting request to Outlook (and have
3、it recognized) goes like this:prepare an iCalendar file, be sure to set these additional properties, as Outlook needs them: UID SEQUENCE CREATEDLAST-MODIFIED DTSTAMPprepare a multipart/alternative mail: Part 1: text/html (or whatever you like) - this is displayed to ordinary mail readers or as a fal
4、l-back and contains a summary of the event in human readable formPart 2: text/calendar; method=REQUEST, holds the contents of the ics file (the header method parameter must match the method in the ics). Watch out for the correct text encoding, declaring a charset header parameter wont hurt.Part 3: O
5、ptionally, attach the .ics file itself, so ordinary mail readers can offer the user something to click on. Outlook does not really require the attachment because it just reads the text/calendar part.Send the mail to an outlook user. If you got everything right the mail shows up as a meeting request,
6、 complete with attendance buttons and automatic entry in the users calendar upon accept.Set up something that processes the responses (they go to the meeting organizer). I have not yet been able to get automatic attendee tracking to work with an Exchange mailbox because the event wont exist in the o
7、rganizers calendar. Outlook needs the UIDs and SEQUENCES to match its expectations, but with a UID you made up this will hardly work.For help on the details and peculiarities of the ics file format, be sure to visit the iCalendar Specification Excerpts by Masahide Kanzaki. They are a light in the da
8、rk, much better than gnawing your way through RFC 2445. But then again, maybe a handy library exists for .NET.sending outlook meeting request through applicationHi, I think you options are; 1.create and ICS file on the server that the user downloads. (many event site do this). 2.If you have exchange
9、 you can use Exchange DAV or EWS to create an send meeting request. (this it probally the easiest) So what do you have in your ENV what kind of experiance are you looking for? is this just for outlook users etc. 76mel Mar 30 10 at 10:17As 76mel suggested an ICS file will create an Outlook calendar e
10、vent (or for any calendar application that supports iCal) - there pretty simple - just need to write a text file with an ICS extension and a mime type of text/calendar:BEGIN:VCALENDARVERSION:2.0PRODID: YourAppNameMETHOD: PUBLISHBEGIN:VEVENTDTSTART:20100401T000000ZDTEND:20100401T000000ZLOCATION:Somew
11、hereUID:MeetingIdDTSTAMP:20100330T225528ZDESCRIPTION:Meeting TitleSUMMARY:Meeting DescriptionEND:VEVENTEND:VCALENDARCreate Outlook Task Request from ASP.NET1 down vote favorite Im looking for a way to create Outlook Task Request from ASP.NET. Im using Exchange Server 2003 for email server. Basically
12、, user of my ASP.NET application will do something that will create Outlook Task based on some logic. Is this natively supported in .NET or must I use third party component?IntroductionIm going to show two different ways of sending tasks programmatically. One is using the Microsoft Outlook 11.0 Obje
13、ct Library and the other is using vCalendar.Using Microsoft Outlook 11.0 Object LibraryThe simplest of these is using Microsoft 11.0 object library. This has a class called TaskItem. TaskItem represents a task (an assigned, delegated, or self-imposed task to be performed within a specified time fram
14、e) in a Tasks folder. Like appointments or meetings, tasks can be delegated. You can get this library from Add Reference and click on COM tab.Create an alias as follows:Collapse | Copy Codeusing Outlook = Microsoft.Office.Interop.Outlook;Create objects of ApplicationClass and TaskItem as follows:Col
15、lapse | Copy CodeOutlook.ApplicationClass app = new Outlook.ApplicationClass();Outlook.TaskItem tsk = (Outlook.TaskItem) app.CreateItem(Outlook.OlItemType.olTaskItem);Set the properties of task as needed:Collapse | Copy Codetsk.StartDate = DateTime.Now;tsk.DueDate = DateTime.Now;tsk.Subject = Test;t
16、sk.Body = Testing Task;tsk.Recipients.Add(abc);tsk.Assign();tsk.Send();Thats it. This is the simplest way for creating and sending a task programmatically. One disadvantage of this is we get to click away the annoying security popups.Using vCalendarThe next way is through the vCalendar object. vCale
17、ndar is the industry standard format for sending/receiving scheduling information electronically. vCalendar was developed by a consortium formed by IBM, AT&T, Siemens and Apple. Later, this specification was given to Internet Mail Consortium. Now, most of the Personal Information Manager (PIM) progr
18、ams on all software support vCalendar as the standard exchange format.Microsoft Outlook supports vCalendar (what more do we want ;). vCalendar files are not just used to exchange appointments and schedules within one organization. They can be used to schedule appointments with others, who use schedu
19、ling software incompatible with yours (all the more we want, right?). Lets get on with how to create a vCalendar object programmatically.vCalendar file would look something like the following:Collapse | Copy CodeBEGIN:VCALENDAR PRODID:-/Microsoft Corporation/Outlook MIMEDIR/EN VERSION:1.0 BEGIN:VEVE
20、NT DTSTART:19980114T210000Z DTEND:19980114T230000Z LOCATION:Team Room CATEGORIES:Business DESCRIPTION;ENCODING=QUOTED-PRINTABLE:Testing Task=0D=0A SUMMARY:Test PRIORITY:3 END:VEVENT END:VCALENDARTo create the vCalendar object, we have the method given below:Collapse | Copy Codestring CreateTask(Date
21、Time start, DateTime end, string sub, string msgBody) StringBuilder sbvCalendar = new StringBuilder(); /Header sbvCalendar.Append(METHOD: REQUEST); sbvCalendar.Append(n); sbvCalendar.Append(BEGIN:VCALENDAR); sbvCalendar.Append(n); sbvCalendar.Append(PRODID:-/Microsoft Corporation/Outlook ); sbvCalen
22、dar.Append(n); sbvCalendar.Append(MIMEDIR/ENVERSION:1.0); sbvCalendar.Append(n); sbvCalendar.Append(BEGIN:VEVENT); sbvCalendar.Append(n); /DTSTART sbvCalendar.Append(DTSTART:); string hour = start.Hour.ToString(); if(hour.Length2)hour =0+ hour; string min = start.Minute.ToString(); if(min.Length2)mi
23、n = 0 + min; string sec = start.Second.ToString(); if(sec.Length2)sec = 0 + sec; string mon = start.Month.ToString(); if(mon.Length2)mon =0 + mon; string day = start.Day.ToString(); if(day.Length2)day =0 + day; sbvCalendar.Append(start.Year.ToString()+ mon + day + T + hour + min + sec ); sbvCalendar
24、.Append(n); /DTEND sbvCalendar.Append(DTEND:); hour = end.Hour.ToString(); if(hour.Length2)hour =0+ hour; min = end.Minute.ToString(); if(min.Length2)min = 0 + min; sec = end.Second.ToString(); if(sec.Length2)sec = 0 + sec; mon = end.Month.ToString(); if(mon.Length2)mon =0 + mon; day = end.Day.ToStr
25、ing(); if(day.Length2)day =0 + day; sbvCalendar.Append(end.Year.ToString()+ mon + day + T + hour + min + sec ); sbvCalendar.Append(n); /Location sbvCalendar.Append(LOCATION;ENCODING=QUOTED-PRINTABLE: + String.Empty); sbvCalendar.Append(n); /Message body sbvCalendar.Append(DESCRIPTION;ENCODING=QUOTED
26、-PRINTABLE: + msgBody); sbvCalendar.Append(n); /Subject sbvCalendar.Append(SUMMARY;ENCODING=QUOTED-PRINTABLE: + sub); sbvCalendar.Append(n); /Priority sbvCalendar.Append(PRIORITY:3); sbvCalendar.Append(n); sbvCalendar.Append(END:VEVENT); sbvCalendar.Append(n); sbvCalendar.Append(END:VCALENDAR); sbvC
27、alendar.Append(n); return sbvCalendar.ToString();We can use this method as:Collapse | Copy Codestring sub = Test;string body = Testing Task;/Create a message objectMailMessage msg = new MailMessage();msg.From = abc;msg.To = def;msg.Subject = sub;msg.BodyEncoding = System.Text.Encoding.UTF8;msg.Body
28、= body; /Set the date/timeDateTime start = DateTime.Parse(Jan 1, 2005);DateTime end = DateTime.Parse(Jan 2, 2005);DateTime ex = DateTime.Now;/Location where you want to save the vCalendar filestring attachUrl = C:InetpubwwwrootWebApplication3bin Test.vcs;/Create taskusing(StreamWriter sw = new Strea
29、mWriter(attachUrl) sw.Write(CreateTask (start, end, sub, body);/Attach the taskMailAttachment mAttachment = new MailAttachment(attachUrl);msg.Attachments.Add(mAttachment); /SendSmtpMail.SmtpServer = some-smtp-mail-;SmtpMail.Send(msg);Thats it. Happy coding!Send Calendar Appointment As Email Attachme
30、ntIntroductionI came across a scenario where a meeting/visit schedule had to be set in an aspx page and the same schedule had to be sent across as a calendar invite in an email. The calendar file was to be an attachment in the email. This article gives a brief description of the procedure to create
31、an outlook calendar appointment(.ics) file and send it through email as an attachment and also to check if the method worked without actually having to configure the SMTP server to send the mail. Steps : Let us divide this section into 3 broad parts: To Create an Outlook calendar (.ics) file. To Attach the file to an Email me