BodyType

The BodyType element identifies how the body text is formatted in the response.

<BodyType>Best or HTML or Text</BodyType>

BodyTypeResponseType

Attributes and elements

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child elements

None.

Parent elements

Element Description
ItemShape
Identifies the item properties and content to include in a GetItem, FindItem, or SyncFolderItems response.

The following are the XPath expressions to this element:

/GetItem/ItemShape

/FindItem/ItemShape

/SyncFolderItems/ItemShape
AttachmentShape
Identifies additional extended item properties to return in a response to a GetAttachment request.

The following is the XPath expression to this element:

/GetAttachment/AttachmentShape

Text value

The following table lists the possible values for the BodyType element.

Value Description
Best
The response will return the richest available content of body text. This is useful if it is unknown whether the content is text or HTML.

The returned body will be text if the stored body is plain text. Otherwise, the response will return HTML if the stored body is in either HTML or RTF format.

This is the default value.
HTML
The response will return an item body as HTML.
Text
The response will return an item body as plain text.

Remarks

You can identify the type of body returned in the response by checking the BodyType attribute of the Body element. The BodyType attribute will identify the body as either HTML or text.

The schema that describes this element is located in the EWS virtual directory of the computer that is running MicrosoftExchange Server 2007 that has the Client Access server role installed.

Example

The following example of a request shows where a BodyType element is used.

<?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/"
               xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Body>
    <GetAttachment xmlns="https://schemas.microsoft.com/exchange/services/2006/messages" 
                      xmlns:t="https://schemas.microsoft.com/exchange/services/2006/types">
      <AttachmentShape>
        <t:BodyType>Best</t:BodyType>
      </AttachmentShape>
      <AttachmentIds>
        <t:AttachmentId Id="ASkAS="/>
      </AttachmentIds>
    </GetAttachment>
  </soap:Body>
</soap:Envelope>

The Id attribute has been shortened to preserve readability.

Element information

Namespace
https://schemas.microsoft.com/exchange/services/2006/types
Schema Name
Types schema
Validation File
Types.xsd
Can be Empty
False