This documentation is archived and is not being maintained.

GetUserOofSettingsRequest Class

The GetUserOofSettingsRequest class represents a request to get a user's Out of Office (OOF) settings.

Namespace: ExchangeWebServices
Assembly: EWS (in ews.dll)

[GeneratedCodeAttribute("wsdl", "2.0.50727.42")] 
public class GetUserOofSettingsRequest : BaseRequestType
/** @attribute SerializableAttribute() */ 
/** @attribute XmlTypeAttribute(Namespace="") */ 
/** @attribute GeneratedCodeAttribute("wsdl", "2.0.50727.42") */ 
/** @attribute DebuggerStepThroughAttribute() */ 
/** @attribute DesignerCategoryAttribute("code") */ 
public class GetUserOofSettingsRequest extends BaseRequestType
GeneratedCodeAttribute("wsdl", "2.0.50727.42") 
public class GetUserOofSettingsRequest extends BaseRequestType

If the OOF message is set by Microsoft Office Outlook, this operation will return the OOF message in HTML format.


The following example shows you how to form a GetUserOofSettings request and receive the response.

static void GetOOF(ExchangeServiceBinding esb)
    // Create the request.
    GetUserOofSettingsRequest request = new GetUserOofSettingsRequest();
    request.Mailbox = new EmailAddress();
    request.Mailbox.Address = "";

        // Send the request and get the response.
        GetUserOofSettingsResponse response = esb.GetUserOofSettings(request);
        if (response.ResponseMessage.ResponseClass == ResponseClassType.Success)
            if (response.AllowExternalOofSpecified)
                Console.WriteLine("External OOF enabled for: " + response.AllowExternalOof);

            // Display OOF information.
            Duration dur = response.OofSettings.Duration;
            Console.WriteLine("OOF start time: " + dur.StartTime.ToString());
            Console.WriteLine("OOF end time: " + dur.EndTime.ToString());

            Console.WriteLine("OOF state: " + response.OofSettings.OofState);
            Console.WriteLine("External reply: " + response.OofSettings.ExternalReply.Message);
            Console.WriteLine("Internal reply: " + response.OofSettings.InternalReply.Message);
    catch (Exception e)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003,

Target Platforms

Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Longhorn, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional with Service Pack 2 (SP2)