zoukankan      html  css  js  c++  java
  • EWS新建会议

    var ews = new ExchangeServiceBinding {
        Credentials = new NetworkCredential("user", "pass"),
        Url = "https://servername/ews/exchange.asmx",
        RequestServerVersionValue = new RequestServerVersion {
            Version = ExchangeVersionType.Exchange2007}
    };
    var startDate = new DateTime(2010, 9, 18, 16, 00, 00);
    var meeting = new CalendarItemType {
        IsMeeting = true,
        IsMeetingSpecified = true,
        Subject = "test EWS",
        Body = new BodyType {Value = "test body", BodyType1 = BodyTypeType.HTML},
        Start = startDate,
        StartSpecified = true,
        End = startDate.AddHours(1),
        EndSpecified = true,
        MeetingTimeZone = new TimeZoneType{
            TimeZoneName = TimeZone.CurrentTimeZone.StandardName, BaseOffset = "PT0H"},
        Location = "Meeting",
        RequiredAttendees = new [] {
            new AttendeeType{Mailbox =new EmailAddressType{
                             EmailAddress ="test1@domain.com",RoutingType = "SMTP"}},
            new AttendeeType{Mailbox =new EmailAddressType{
                             EmailAddress ="test2@domain.com",RoutingType = "SMTP"}}
        }
    };
    var request = new CreateItemType {
        SendMeetingInvitations =
            CalendarItemCreateOrDeleteOperationType.SendToAllAndSaveCopy,
        SendMeetingInvitationsSpecified = true,
        SavedItemFolderId = new TargetFolderIdType{Item = new DistinguishedFolderIdType{
                                            Id=DistinguishedFolderIdNameType.calendar}},
        Items = new NonEmptyArrayOfAllItemsType {Items = new ItemType[] {meeting}}
    };
    CreateItemResponseType response = ews.CreateItem(request);
    var responseMessage = response.ResponseMessages.Items[0];
     
    <CreateItem
           xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
           SendMeetingInvitations="SendToAllAndSaveCopy" >
      <SavedItemFolderId>
        <t:DistinguishedFolderId Id="calendar"/>
      </SavedItemFolderId>
      <Items>
        <t:CalendarItem>
          <t:Subject>Meeting with attendee0, attendee1, attendee2</t:Subject>
          <t:Body BodyType="Text">CalendarItem:TextBody</t:Body>
          <t:Start>2006-06-25T10:00:00Z</t:Start>
          <t:End>2006-06-25T11:00:00Z</t:End>
          <t:Location>CalendarItem:Location</t:Location>
          <t:RequiredAttendees>
            <t:Attendee>
              <t:Mailbox>
                <t:EmailAddress>attendee0@example.com</t:EmailAddress>
              </t:Mailbox>
            </t:Attendee>
            <t:Attendee>
              <t:Mailbox>
                <t:EmailAddress>attendee1@example.com</t:EmailAddress>
              </t:Mailbox>
            </t:Attendee>
          </t:RequiredAttendees>
          <t:OptionalAttendees>
            <t:Attendee>
              <t:Mailbox>
                <t:EmailAddress>attendee2@example.com</t:EmailAddress>
              </t:Mailbox>
            </t:Attendee>
          </t:OptionalAttendees>
          <t:Resources>
            <t:Attendee>
              <t:Mailbox>
                <t:EmailAddress>room0@example.com</t:EmailAddress>
              </t:Mailbox>
            </t:Attendee>
          </t:Resources>
        </t:CalendarItem>
      </Items>
    </CreateItem>
     
    var meeting = new CalendarItemType
    {
        IsMeeting = true,
        Subject = "test EWS",
        Body = new BodyType { Value = "test body", BodyType1 = BodyTypeType.HTML },
        Start = startDate,
        StartSpecified = true,
        End = startDate.AddHours(1),
        EndSpecified = true,
        MeetingTimeZone = new TimeZoneType
        {
            TimeZoneName = TimeZone.CurrentTimeZone.StandardName,
            BaseOffset = "PT0H"
        },
        Location = "Room 1",
        RequiredAttendees = new[] {
            new AttendeeType
            {
                Mailbox =new EmailAddressType
                {    
                    EmailAddress ="test@test.com"
                }
            },
        }
    };

  • 相关阅读:
    mysql5.6 sql_mode设置为宽松模式
    utf-8 编码问题
    阿里云服务器挂载云盘
    maven打包含有多个main程序的jar包及运行方式
    AndroidStudio OpenCv的配置,不用安装opencv manager
    图片标注工具LabelImg使用教程
    关于tensorboard启动问题
    IntelliJ IDEA 最新激活码(截止到2018年10月14日)
    JetBrains C++ IDE CLion配置与评测
    Win10下Clion配置opencv3
  • 原文地址:https://www.cnblogs.com/csts/p/2459201.html
Copyright © 2011-2022 走看看