【问题标题】:How to generate the Organizer field with DDay.iCal?如何使用 DDay.iCal 生成 Organizer 字段?
【发布时间】:2015-08-22 06:02:24
【问题描述】:

我正在使用 C# 库 DDay.iCal 并尝试生成 IETF RFC 2445 中定义的 ORGANIZER 字段:

ORGANIZER;CN=John Smith:MAILTO:jsmith@host1.com

一个简单的问题:我该怎么做?我已经尝试了几种替代方法,但都没有成功:结果总是有问题。

【问题讨论】:

    标签: c# icalendar dday


    【解决方案1】:

    我自己回答这个问题。在更仔细地研究了 RFC 2445(或 5545)之后,这一点非常明显:

    iCalendar iCal = new iCalendar();
    Event ev = iCal.Create<Event>();
    
    ev.Organizer = new Organizer("MAILTO:jsmith@host1.com");
    ev.Organizer.CommonName = "John Smith";
    

    好吧,结果不完全一样:

    ORGANIZER;CN="John Smith":MAILTO:jsmith@host1.com
    

    但是,MS Outlook 接受这种格式,这正是我所关心的。

    【讨论】:

      猜你喜欢
      • 2014-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-28
      • 2022-01-07
      • 2019-11-20
      • 1970-01-01
      • 2012-09-11
      相关资源
      最近更新 更多