EwsAddAttachmentToItem Method
Adds an attachment to an existing item.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 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.
NotImplementedExceptionThe .NET runtime is .NET Core.
Remarks
Note Note
This method is not implemented in .NET Core. Use AddAttachmentToItemAsync(ItemId, String, String) instead.
See Also