AttachmentCollectionAddAsync Method (String, String, String) |
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public Task<bool> AddAsync(
string filename,
string targetFilename,
string contentID
)
Public Function AddAsync (
filename As String,
targetFilename As String,
contentID As String
) As Task(Of Boolean)
Parameters
- filename
- Type: SystemString
The absolute or relative path to the file which should be attached. - targetFilename
- 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. - contentID
- Type: SystemString
The content identifier (CID) of the attachment (for inline attachments), or empty string
if the attachment is not inline.
Return Value
Type:
TaskBooleanA task that represents the asynchronous operation.
The value of
TResult parameter is
true if the attachment was successfully added; otherwise,
false.
Exceptions See Also