EwsAddAttachmentToItem Method
Adds an attachment to an existing item.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public FileAttachment AddAttachmentToItem(
	ItemId id,
	string filename,
	string targetFilename
)

Parameters

id
Type: ItemId
The ID of the item. Null reference (Nothing in Visual Basic) not allowed.
filename
Type: SystemString
The path to the local file whihc will then be uploaded to the server and attached to the item. Null reference (Nothing in Visual Basic) or empty string not allowed.
targetFilename
Type: SystemString
The attachment filename as it should appear in the message. If a null reference, Mailbee will take it from filename parameter.

Return Value

Type: FileAttachment
EWS Managed API FileAttachment object representing the attachment just added, or a null reference (Nothing in Visual Basic) on error.
Exceptions
ExceptionCondition
MailBeeExceptionAn error occurred and ThrowExceptions is true.
See Also