I am using the C# library DDay.iCal and trying to produce the ORGANIZER field as defined in IETF RFC 2445:
ORGANIZER;CN=John Smith:MAILTO:jsmith@host1.com
A simple question: how can I do this? I have already tried several alternatives with no success: there is always something wrong with the result.
Answering this myself. This was pretty obvious after studying RFC 2445 (or 5545) more closely:
iCalendar iCal = new iCalendar();
Event ev = iCal.Create<Event>();
ev.Organizer = new Organizer("MAILTO:jsmith@host1.com");
ev.Organizer.CommonName = "John Smith";
Ok, the result is not exactly the same:
ORGANIZER;CN="John Smith":MAILTO:jsmith@host1.com
However, MS Outlook accepts this format and this is what I was looking after.