Version: 1.0.4.0
Powerful and comprehensive email address validation for .NET applications.

Validator .NET Component

Use the Validator component to integrate email address confirmation into any .NET application. Included features:

  • Easily validates large lists of email addresses.
  • Verify addresses to seven levels of validation, from syntax check to querying accounts on mail servers:
    Syntax. The address is formatted correctly.
    Blacklist. Check for known bad email addresses.
    Whitelist. Check for known good email addresses.
    Greenlist. Check for addresses with domains that confirm all addresses.
    DnsLookup. Check for mail exchange servers (MX records) associated with the email address.
    SmtpConnect. Attempt to connect to these mail servers.
    SmtpRecipient. Query these servers for the existence of the email address's mailbox.  
  • Includes a domain cache option for eliminating redundant DNS queries. 
  • Utilizes a "greenlist" for servers that return false positive responses.
  • Persists connections for email addresses hosted on the same domain for increased performance.
  • Includes fully configurable classes for regulating DNS and SMTP connections.
  • Supports both synchronous and asynchronous application designs.
  • Trace events expose the underlying DNS and SMTP connections.
  • C# and VB.NET sample projects included.
  • Includes a royalty-free license!

Interface

Public Constructors
Validator Overloaded. Initialize a new instance of the Validator class.
Public Properties
Blacklist Gets or sets a list of bad addresses and/or domains.
Dns Gets a Dns object used for DNS functionality.
DoEvents Gets or sets a value that controls the processing of events during blocking method calls.
DomainCacheTimeout Gets or sets the internal domain cache's timeout value (in seconds).
Greenlist Gets a list of servers that always provide a positive response to a recipient query.
Pattern Gets or sets the Regular Expression pattern used when an email address's syntax is validated.
Smtp Gets an SmtpTester object for SMTP functionality.
SynchronizingObject Set this object to automatically control thread marshalling between worker threads and the main UI thread.
ValidationLevel Gets or sets a value indicating the level to which validations should be performed.
VerboseProgress Gets or sets a value indicating whether the Progress event should fire when the validation progresses to each ValidationLevel.
Whitelist Gets or sets a list of good addresses and/or domains.
Public Methods
Abort Aborts the Validation process.
BeginValidate Validates email addresses in a non-blocking fashion.
Validate Validates email addresses in a blocking fashion.
Public Events
EndValidate Raised when a BeginValidate call is completed.
Progress Raised when a Validate or BeginValidate call is completed, and during the validation process when VerboseProgress is true.

Code Example

How easy is the Validator component to use? The following VB.NET snippet demonstrates blocking validation of an email address.

VB.NET Example
Private Function doValidation(ByVal emailAddress As String) As String
    'Add "Imports Dart.PowerTCP.EmailValidation" at the top
    'Validate to the final level
    Validator1.ValidationLevel = ValidationLevel.SmtpRecipient
    Validator1.Smtp.MailFrom = "myAccount@myDomain.com" 'required

    'Validate and return the result
    Dim result As ValidationState = Validator1.Validate(emailAddress)
    Dim description As String = "The validation of " + result.EmailAddress + " proceeded to the "
    description += result.Progress.ToString() + " level. "

    If (result.Exception Is Nothing) Then
        description += "The validation was successful."
    Else
        description += "The following exception occurred: " + result.Exception.ToString()
    End If
    Return description
End Function