OofState

OofState 元素用于获取或设置用户的外出 (OOF) 状态。

<OofState>Disabled or Enabled or Scheduled</OofState>

OofState

属性和元素

下面各部分介绍了属性、子元素和父元素。

Attributes

无。

子元素

无。

父元素

元素 说明
UserOofSettings
指定 OOF 设置。
下面是此元素的 XPath 表达式:
/SetUserOofSettingsRequest/UserOofSettings
OofSettings
包含 OOF 设置。
下面是此元素的 XPath 表达式:
/GetUserOofSettingsResponse/OofSettings

文本值

OofState 元素需要文本值。 以下列表包含此元素的可能值:

  • Disabled

  • Enabled

  • Scheduled

Scheduled 的值指示在由 Duration (UserOofSettings) 元素标识的时间段内,OOF 状态设置为“已启用”。

备注

SetUsersOofSettingRequest 消息和 GetUserOofSettingResponse 消息中都需要此元素。

描述此元素的架构位于正在运行 MicrosoftExchange Server 2007 的计算机(已安装客户端访问服务器角色)的 EWS 虚拟目录中。

示例

下面的 SetUserOofSettings 请求示例启用 OofState

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SetUserOofSettingsRequest xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
      <Mailbox xmlns="https://schemas.microsoft.com/exchange/services/2006/types">
        <Name>David Alexander</Name>
        <Address>someone@example.com</Address>
        <RoutingType>SMTP</RoutingType>
      </Mailbox>
      <UserOofSettings xmlns="https://schemas.microsoft.com/exchange/services/2006/types">
        <OofState>Enabled</OofState>
        <ExternalAudience>All</ExternalAudience>
        <Duration>
          <StartTime>2005-10-05T00:00:00</StartTime>
          <EndTime>2005-10-25T00:00:00</EndTime>
        </Duration>
        <InternalReply>
          <Message>I am out of office.  This is my internal reply.</Message>
        </InternalReply>
        <ExternalReply>
          <Message>I am out of office. This is my external reply.</Message>
        </ExternalReply>
      </UserOofSettings>
    </SetUserOofSettingsRequest>
  </soap:Body>
</soap:Envelope>

元素信息

元素 示例
命名空间
https://schemas.microsoft.com/exchange/services/2006/types
架构名称
类型架构
验证文件
Types.xsd
可以为空
False

另请参阅

GetUserOofSettings 操作

SetUserOofSettings 操作