Export (0) Print
Expand All

2.2.2.6 GetAttachment

The GetAttachment command retrieves an email attachment from the server.

Attachment data is not automatically included with email messages in a synchronization. Instead, an Attachment element ([MS-ASAIRS] section 2.2.2.2) is included for each attachment. The Attachment element specifies the location of an item on the server to retrieve in the FileReference element ([MS-ASAIRS] section 2.2.2.14.1). Attachments are explicitly retrieved by attachment file reference using the GetAttachment command.

This command is issued within the HTTP POST command, and does not require any additional information in an XML body. The name of the attachment to be retrieved is specified in the AttachmentName command parameter.

The content of the attachment is returned in the response body with the content type being specified in the Content-Type header of the response. When the Content-Type header is missing, this indicates that the default encoding of 7-bit ASCII has been used.

If the GetAttachment command is used to retrieve an attachment that has been deleted on the server, a 500 status code is returned in the HTTP POST response.

Protocol Versions

The following table specifies the protocol versions that support this command. The client indicates the protocol version being used by setting either the MS-ASProtocolVersion header, as specified in [MS-ASHTTP] section 2.2.1.1.2.4, or the Protocol version field, as specified in [MS-ASHTTP] section 2.2.1.1.1.1, in the request.

Protocol version

Command support

2.5

X

12.0

X

12.1

X

14.0

14.1

In protocol versions 14.0 and 14.1, an attachment is fetched via the Fetch element of the ItemOperations command, as specified in section 2.2.2.3. In version 2.5 of the protocol, the email:Attachment element ([MS-ASEMAIL] section 2.2.2.3) is used instead of the airsyncbase:Attachment element ([MS-ASAIRS] section 2.2.2.2) element.

Show:
© 2014 Microsoft