?
Solved

Sending Calendar Appointments in ASP.Net to Outlook and Lotus Notes

Posted on 2008-11-04
3
Medium Priority
?
1,195 Views
Last Modified: 2012-05-05
I have created a .Net recruitment website that allows an administrator to set up interviews for candidates.

I am now wanting to extend the functionality so that a site administrator can send Outlook and/or Lotus Notes invitation requests to certain people.
If it was just a case of sending an email to the people then I wouldn't have any trouble. But, does anyone know how you go about sending an invitation request instead? Would the code need to be different for recipients with Outlook or Lotus Notes?

Also, how would I manage the invitation rejects and accepts, is it possible to set a From field that would receive these?

Any advice would be much appreciated.
0
Comment
Question by:robert_raw
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1500 total points
ID: 22893446
I am not sure about Lotus Notes but i think you could be able to use the following code to create calender files and send them via email.
                System.Text.StringBuilder sbICSFile =
                    new System.Text.StringBuilder();
                DateTime dtNow = DateTime.Now;
 
                sbICSFile.AppendLine("BEGIN:VCALENDAR");
                sbICSFile.AppendLine("VERSION:2.0");
                sbICSFile.AppendLine("PRODID:-//ICSTestCS/");
                sbICSFile.AppendLine("CALSCALE:GREGORIAN");
 
                // Define time zones.
                // GMT
                sbICSFile.AppendLine("BEGIN:VTIMEZONE");
                sbICSFile.AppendLine("TZID:GMT");
                sbICSFile.AppendLine("BEGIN:STANDARD");
                sbICSFile.AppendLine("DTSTART:20071104T020000");
                sbICSFile.AppendLine("RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11");
                sbICSFile.AppendLine("TZOFFSETFROM:+0000");
                sbICSFile.AppendLine("TZOFFSETTO:+0000");
                sbICSFile.AppendLine("TZNAME:GMT");
                sbICSFile.AppendLine("END:STANDARD");
                sbICSFile.AppendLine("BEGIN:DAYLIGHT");
                sbICSFile.AppendLine("DTSTART:20070311T020000");
                sbICSFile.AppendLine("RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3");
                sbICSFile.AppendLine("TZOFFSETFROM:+0000");
                sbICSFile.AppendLine("TZOFFSETTO:+0000");
                sbICSFile.AppendLine("TZNAME:GMT");
                sbICSFile.AppendLine("END:DAYLIGHT");
                sbICSFile.AppendLine("END:VTIMEZONE");
 
                // Define the event.
                sbICSFile.AppendLine("BEGIN:VEVENT");
 
                sbICSFile.AppendLine("SUMMARY:Test");
                sbICSFile.AppendLine("DESCRIPTION: Test");
                sbICSFile.AppendLine("PRIORITY:3");
                sbICSFile.AppendLine("UID:1");
                sbICSFile.AppendLine("SEQUENCE:0");
                sbICSFile.AppendLine("ATTENDEE;CN=test@test.com;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:test@test.com);
                sbICSFile.Append("DTSTAMP:" + dtNow.Year.ToString());
                sbICSFile.Append(FormatDateTimeValue(dtNow.Month));
                sbICSFile.Append(FormatDateTimeValue(dtNow.Day) + "T");
                sbICSFile.Append(FormatDateTimeValue(dtNow.Hour));
                sbICSFile.AppendLine(FormatDateTimeValue(dtNow.Minute) + "00");
 
                sbICSFile.AppendLine("END:VEVENT");
                sbICSFile.AppendLine("END:VCALENDAR");
 
                Response.ContentType = "text/calendar";
                Response.AddHeader("content-disposition",
                    "attachment; filename=CalendarEvent1.ics");
                Response.Write(sbICSFile);
                Response.End();

Open in new window

0
 

Author Closing Comment

by:robert_raw
ID: 31513188
Hi CodeCruiser, thanks for your help with this, although ultimately I didn't use the code you supplied (I used code I found at: http://chuckdotnet.blogspot.com/) the code you did provide however did point me in the right direction to the solution and therefore, I am happy to award you the points.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 22930699
Glad to help. Thank you.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Integration Management Part 2
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question