Hey Everyone,
I have run into a real tough issue that I have just been completely stumped on. I have to create a meeting request via E-Mail to Outlook using the VCALENDAR format. I can create .ics files all day long and they work great as attachments, but they want it as an actual meeting request, not an attachment.
The code I use to send the email will follow, but the problem is this: When I send the calendar via email, no matter what I do, none of the "Required" or "Optional" attendees show. To see what I mean, click here:
Appointment Format[
^]
Do any of you have any idea how to make this work?
Code:
System.Net.Mime.ContentType calendarType = new System.Net.Mime.ContentType("text/calendar");
calendarType.Parameters.Add("method", "REQUEST");
calendarType.Parameters.Add("name", "meeting.ics");
MailMessage msg = new MailMessage();
AlternateView calendarView = AlternateView.CreateAlternateViewFromString(GetVCalendar().ToString(), calendarType);
msg.AlternateViews.Add(calendarView);
msg.To.Add("some.recipient@myco.com");
msg.From = new MailAddress("my.service@myco.com");
string mailServer = "extrelay.myco.com";
SmtpClient client = new SmtpClient(mailServer);
client.Send(msg);
This is the string retrieved by GetVCalendar() --
BEGIN:VEVENT
ATTENDEE;CN="Someone Else";ROLE=OPT-PARTICIPANT;RSVP=FALSE:mailto:Some
one.else@myco.com
CLASS:PUBLIC
CREATED:20100804T132739Z
DTEND:20100806T030101Z
DTSTAMP:20100804T132739Z
DTSTART:20100806T020101Z
LAST-MODIFIED:20100804T132739Z
LOCATION:Some Location
ORGANIZER;CN="Some Organizer":mailto:Some.Organizer@myco.com
PRIORITY:Normal
SEQUENCE:0
SUMMARY;LANGUAGE=en-us:Some Title
TRANSP:OPAQUE
UID:700cfaa62f1d4c1f9c042b2c34224bb7
X-ALT-DESC;FMTTYPE=text/html:<html><head><title>This is a title</title><
/head><body><span style="color:Lime">This is LIME green!</span></body></
html>
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
X-MICROSOFT-CDO-IMPORTANCE:Normal
X-MICROSOFT-DISALLOW-COUNTER:TRUE
X-MS-OLK-ALLOWEXTERNCHECK:TRUE
X-MS-OLK-APPTSEQTIME:20100804T132739Z
X-MS-OLK-AUTOFILLLOCATION:TRUE
X-MS-OLK-CONFTYPE:0
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT