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