DmarcRecordTryParse Method

Try to parse the given text into a new DmarcRecord instance.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public static bool TryParse(
	string? text,
	out DmarcRecord?? record
)

Parameters

text  String
The text to parse.
record  DmarcRecord
The parsed DMARC Policy Record.

Return Value

Boolean
if the text is a DMARC Policy Record; otherwise, .

Remarks

Parses a DMARC Policy Record from the text of a DNS TXT record. If the TXT record consists of multiple character-strings, they must be concatenated without any separator before being parsed.

Returns only if the text is not a DMARC Policy Record (i.e. it does not begin with v=DMARC1). Syntax errors in the remainder of the record are discarded in favor of default values and reported by the Errors property.

See Also