Operação SetUserOofSettingsSetUserOofSettings operation

O método Web SetUserOofSettings define as configurações e mensagens de ausência temporária (OOF) de um usuário de caixa de correio.The SetUserOofSettings Web method sets a mailbox user's Out of Office (OOF) settings and message.

Cabeçalhos SOAPSOAP Headers

A operação SetUserOofSettings pode usar os cabeçalhos SOAP listados e descritos na tabela a seguir.The SetUserOofSettings operation can use the SOAP headers that are listed and described in the following table.

HeaderHeader ElementoElement DescriçãoDescription
RepresentaçãoImpersonation
ExchangeImpersonationExchangeImpersonation
Identifica o usuário que o aplicativo cliente está representando.Identifies the user whom the client application is impersonating.
ServerVersionServerVersion
ServerVersionInfoServerVersionInfo
Identifica a versão do servidor que respondeu à solicitação.Identifies the version of the server that responded to the request.

Exemplo de solicitação SetUserOofSettingsSetUserOofSettings request example

DescriçãoDescription

O exemplo a seguir de uma solicitação SetUserOofSettings define uma configuração de ausência temporária por 10 dias.The following example of a SetUserOofSettings request sets an OOF setting for 10 days.

CódigoCode

<?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>User1</Name>
        <Address>user1@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>2006-10-05T00:00:00</StartTime>
          <EndTime>2006-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>

Elementos RequestRequest elements

Os seguintes elementos são usados na solicitação:The following elements are used in the request:

Exemplo de resposta SetUserOofSettings bem-sucedidaSuccessful SetUserOofSettings response example

DescriçãoDescription

O exemplo a seguir mostra uma resposta bem-sucedida à solicitação SetUserOofSettings .The following example shows a successful response to the SetUserOofSettings request.

CódigoCode

<?xml version="1.0" encoding="utf-8" ?> 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Header>
    <t:ServerVersionInfo MajorVersion="8" MinorVersion="0" MajorBuildNumber="685" MinorBuildNumber="8" xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types" /> 
  </soap:Header>
  <soap:Body>
    <SetUserOofSettingsResponse xmlns="https://schemas.microsoft.com/exchange/services/2006/messages">
      <ResponseMessage ResponseClass="Success">
        <ResponseCode>NoError</ResponseCode> 
      </ResponseMessage>
    </SetUserOofSettingsResponse>
  </soap:Body>
</soap:Envelope>

Elementos de resposta bem-sucedidosSuccessful response elements

Os seguintes elementos são usados na resposta:The following elements are used in the response:

Confira tambémSee also