MimeParserParseMessage Method

Parse a message from the stream.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public MimeMessage ParseMessage(
	CancellationToken cancellationToken = default
)

Parameters

cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

MimeMessage
The parsed message.

Implements

IMimeParserParseMessage(CancellationToken)

Remarks

Parses a message from the stream.

Exceptions

OperationCanceledException The operation was canceled via the cancellation token.
FormatException There was an error parsing the message.
IOException An I/O error occurred.

See Also