| AttachmentCollectionAddAsync(String, CancellationToken) Method |
Asynchronously add an attachment.
Namespace: MimeKitAssembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax public Task<MimeEntity> AddAsync(
string fileName,
CancellationToken cancellationToken = default
)
Parameters
- fileName String
- The name of the file.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskMimeEntityThe newly added attachment
MimeEntity.
Exceptions Remarks Asynchronously adds the specified file as an attachment.
See Also