Attachment |
public Task<MimeEntity> AddAsync( string fileName, Stream stream, CancellationToken cancellationToken = default )
Exception | Condition |
---|---|
ArgumentNullException | fileName is null. -or- stream is null. |
ArgumentException | The specified file path is empty. |
IOException | An I/O error occurred. |
OperationCanceledException | The operation was canceled via the cancellation token. |
Asynchronously adds the stream as an attachment, using the specified file name for deducing the mime-type by extension and for setting the Content-Location.