AttachmentCollectionAddAsync Method (String, String)
async/await version of Add(String, String).

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public Task<bool> AddAsync(
	string filename,
	string targetFilename


Type: SystemString
The absolute or relative path to the file which should be attached.
Type: SystemString
The filename of the attachment as it should appear in the mail message. If a null reference (Nothing in Visual Basic), MailBee will take it from filename parameter value. If an empty string, the attachment will have no name.

Return Value

Type: TaskBoolean
A task that represents the asynchronous operation. The value of TResult parameter is true if the attachment was successfully added; otherwise, false.
MailBeeInvalidArgumentExceptionfilename is a null reference (Nothing in Visual Basic) or an empty string.
MailBeeIOExceptionAn error occurred and ThrowExceptions is true.
See Also