DmarcRecordParse Method

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 DmarcRecord Parse(
	string text
)

Parameters

text  String
The text to parse.

Return Value

DmarcRecord
The parsed DMARC Policy Record.

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.

Throws a ParseException 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.

Exceptions

ArgumentNullException text is .
ParseException text is not a DMARC Policy Record.

See Also