SmtpUtf8AddressValidatorTryValidate(String, SmtpUtf8AddressError) Method

Validate an address as an SMTPUTF8 address.

Definition

Namespace: MimeKit.Utils
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public static bool TryValidate(
	string address,
	out SmtpUtf8AddressError error
)

Parameters

address  String
The address.
error  SmtpUtf8AddressError
The reason that the address is invalid or None if it is valid.

Return Value

Boolean
if the address is valid; otherwise, .

Remarks

Validates an addr-spec (such as user@example.com) as an SMTPUTF8 address as defined by draft-ietf-mailmaint-smtputf8-syntax.

The address must not include a display name, angle brackets, comments, or folding whitespace.

Exceptions

ArgumentNullException address is .

See Also