 | AttachmentCollectionAddAsync(String, CancellationToken) Method |
Asynchronously add an attachment.
Namespace: MimeKitAssembly: MimeKit (in MimeKit.dll) Version: 4.10.0
Syntaxpublic 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
RemarksAsynchronously adds the specified file as an attachment.
See Also