Adds a stream as new attachment to an exchange item.

Namespace:  Rebex.Net
Assembly:  Rebex.Ews (in Rebex.Ews.dll)

Syntax

Visual Basic
Public Function AddAttachment ( _
	itemId As EwsItemId, _
	name As String, _
	input As Stream, _
	contentType As String _
) As EwsAttachmentId
C#
public EwsAttachmentId AddAttachment(
	EwsItemId itemId,
	string name,
	Stream input,
	string contentType
)

Parameters

itemId
Type: Rebex.Net..::..EwsItemId
ID of an item to which to add the attachment.
name
Type: System..::..String
Display name of new attachment.
input
Type: System.IO..::..Stream
A stream to read attachment data from.
contentType
Type: System..::..String
Content type of an attachment. For predefined strings see MediaTypeNames subclasses's constants.

Return Value

EwsAttachmentId of the new attachment.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also