Smtp Address ValidatorIs Valid(String, Smtp Address Validation Options) Method
Check whether an address is a valid SMTP address.
Definition
Namespace: MimeKit.Utils
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
if the address is valid; otherwise, .
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public static bool IsValid(
string address,
SmtpAddressValidationOptions options
)Parameters
- address String
- The address.
- options SmtpAddressValidationOptions
- The validation options.
Return Value
Booleanif the address is valid; otherwise, .
Remarks
Checks whether an addr-spec (such as user@example.com) is a valid SMTP address as defined by rfc5321, using the specified options.
The address must not include a display name, angle brackets, comments, or folding whitespace.
Exceptions
| ArgumentNullException | address is . |