This documentation applies to older versions of WSO2 ESB connectors. To find the documentation relevant to the version you are using, select the connector from the WSO2 Connector Store and click Documentation.

All docs This doc
Skip to end of metadata
Go to start of metadata


Overview

The following operations allow you to work with attachments in EWS. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with attachments, see Sample configuration

OperationDescription

createAttachment

Creates an attachment to an item

getAttachment

Retrieves existing attachments on items

Operation details

This section provides further details on the operations related to attachments.

Creating an attachment

The createAttachment operation creates an attachment to an item in the Exchange Server.

createAttachment
<ews:createAttachment>
	<timeZoneDefinition>{$ctx:uri.var.timeZoneDefinition}</timeZoneDefinition>
	<periods>{$ctx:uri.var.periods}</periods>
	<transitionsGroups>{$ctx:uri.var.transitionsGroups}</transitionsGroups>
	<transitions>{$ctx:uri.var.transitions}</transitions>
	<requestServerVersion>{$ctx:uri.var.requestServerVersion}</requestServerVersion>
	<mailboxCulture>{$ctx:uri.var.mailboxCulture}</mailboxCulture>
	<principalName>{$ctx:uri.var.principalName}</principalName>
	<sid>{$ctx:uri.var.sid}</sid>
	<primarySmtpAddress>{$ctx:uri.var.primarySmtpAddress}</primarySmtpAddress>
	<smtpAddress>{$ctx:uri.var.smtpAddress}</smtpAddress>
	<parentItemId>{$ctx:uri.var.parentItemId}</parentItemId>
	<attachments>{$ctx:uri.var.attachments}</attachments>
</ews:createAttachment>
Properties
  • timeZoneDefinition:The periods and transitions that define a time zone.
  • periods:One or more periods that define the time offset at different stages of the time zone.
  • transitionsGroups:One or more time zone transition groups.
  • transitions:One or more time zone transitions.
  • requestServerVersion:The server version of the EWS endpoint.
  • mailboxCulture:The language to be used when opening a mailbox.
  • principalName:The user principal name (UPN) of the Exchange account.
  • sid:The security identifier of the Exchange account.
  • primarySmtpAddress:The primary email address of the Exchange account.
  • smtpAddress:The email address of the Exchange account.
  • parentItemId:The item for which the attachment is created.
  • attachments:Details of the attachment.
Sample request

For a sample REST/XML request that can be handled by the createAttachment operation, see Sample request for createAttachment .

Related EWS API documentation

https://msdn.microsoft.com/en-us/library/office/aa565877(v=exchg.150).aspx

Retrieving an attachment

The getAttachment operation retrieves existing attachments on items in the Exchange Server.

getAttachment
<ews:getAttachment>    
    <timeZoneDefinition>{$ctx:uri.var.timeZoneDefinition}</timeZoneDefinition>
    <periods>{$ctx:uri.var.periods}</periods>
    <transitionsGroups>{$ctx:uri.var.transitionsGroups}</transitionsGroups>
    <transitions>{$ctx:uri.var.transitions}</transitions>
    <requestServerVersion>{$ctx:uri.var.requestServerVersion}</requestServerVersion>
    <mailboxCulture>{$ctx:uri.var.mailboxCulture}</mailboxCulture>
    <principalName>{$ctx:uri.var.principalName}</principalName>
    <sid>{$ctx:uri.var.sid}</sid>
    <primarySmtpAddress>{$ctx:uri.var.primarySmtpAddress}</primarySmtpAddress>
    <smtpAddress>{$ctx:uri.var.smtpAddress}</smtpAddress>
    <includeMimeContent>{$ctx:uri.var.includeMimeContent}</includeMimeContent>
    <bodyType>{$ctx:uri.var.bodyType}</bodyType>
    <filterHtmlContent>{$ctx:uri.var.filterHtmlContent}</filterHtmlContent>
    <additionalProperties>{$ctx:uri.var.additionalProperties}</additionalProperties>
    <attachmentId>{$ctx:uri.var.attachmentId}</attachmentId>
</ews:getAttachment>
  Properties
  • timeZoneDefinition:The periods and transitions that define a time zone.
  • periods:One or more periods that define the time offset at different stages of the time zone.
  • transitionsGroups:One or more time zone transition groups.
  • transitions:One or more time zone transitions.
  • requestServerVersion:The server version of the EWS endpoint.
  • mailboxCulture:The language to be used when opening a mailbox.
  • principalName:The user principal name (UPN) of the Exchange account.
  • sid:The security identifier of the Exchange account.
  • primarySmtpAddress:The primary email address of the Exchange account.
  • smtpAddress:The email address of the  Exchange account.
  • includeMimeContent:Whether the Multipurpose Internet Mail Extensions (MIME) content of the attachment is returned in the response. Possible values are either true or false.
  • bodyType:Specifies how the body text is formatted.
  • filterHtmlContent: Whether potentially unsafe HTML content is filtered from an attachment. Possible values are either true or false.
  • additionalProperties: Additional properties of the attachment to be retrieved.
  • attachmentId:Unique identifier of the attachment to be retrieved.
Sample request

For a sample REST/XML request that can be handled by the getAttachment operation, see Sample request for getAttachment.

Related EWS API documentation

https://msdn.microsoft.com/en-us/library/office/aa494316(v=exchg.150).aspx

Sample configuration

For a sample proxy service that illustrates how to connect to EWS with the init operation and use the createAttachment operation, see createAttachment sample configuration. The sample request for this proxy can be found in createAttachment sample request.

For a sample proxy service that illustrates how to connect to EWS with the init operation and use the  getAttachment  operation, see getAttachment sample configuration. The sample request for this proxy can be found in getAttachment sample request.

 

  • No labels