• 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"
                }
            },
        }
    };

  • 相关阅读:
    事务处理语言(TCL)
    SQL,T-SQL简介
    centos 8 集群Linux环境搭建
    graphviz 的使用教程
    pyttsx3 的使用教程
    python 连接 SQL Server 数据库(使用 pymssql 库)
    python 连接 SQL Server 数据库(使用 pyodbc 库)
    C++注释规范
    IP分配及网段划分
    关于对象的浅度拷贝和深度拷贝
  • 原文地址:https://www.cnblogs.com/csts/p/2459201.html
Copyright © 2020-2023  润新知