EmailAddressValidatorVerify Method (String)
Validates a single e-mail address for correct syntax and, optionally, checks it for existence.

Namespace: MailBee.AddressCheck
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public AddressValidationLevel Verify(
	string email
)

Parameters

email
Type: SystemString
The e-mail address to check. Must be somewhat like "user@domain.com".

Return Value

Type: AddressValidationLevel
OK if the validation succeeded, or the particular validation level at which the verification failed.
Exceptions
ExceptionCondition
MailBeeInvalidArgumentExceptionemail is a null reference (Nothing in Visual Basic) or DnsServers collection is empty.
MailBeeUserAbortExceptionThe user code has aborted the component with Abort method.
Remarks
This overload does not raise Verifying and Verified events.
Examples
This sample verifies a single e-mail address.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.AddressCheck;

// The actual code (put it into a method of your class)

EmailAddressValidator valid = new EmailAddressValidator();
valid.Log.Enabled = true;
valid.Log.Filename = @"C:\Temp\log.txt";
valid.DnsServers.Autodetect();
Console.WriteLine(valid.Verify("jdoe@company.com").ToString());
See Also