Tnef AttachmentLoad Embedded Message Async Method
Asynchronously load the embedded message.
Definition
Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The embedded message.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public Task<TnefMessage> LoadEmbeddedMessageAsync(
CancellationToken cancellationToken = default
)Parameters
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskTnefMessageThe embedded message.
Remarks
Asynchronously loads the embedded TNEF message contained within the attachment.
The embedded message is loaded using the same TnefOptions and compliance logger as the message that contains it, and has its own MaxTotalDataBytes budget. If it is nested more deeply than MaxNestingDepth allows, a NestingTooDeep issue is reported and an empty message is returned.
The returned message is independent of the attachment and must be disposed by the caller.
Exceptions
| ObjectDisposedException | The attachment has been disposed. |
| InvalidOperationException | The attachment is not an embedded message. |
| TnefException | The embedded message does not begin with the TNEF signature. |
| OperationCanceledException | The operation was canceled via the cancellation token. |