
PowerTCP Email Validation for .NET
Overview Email Address Validation and List Verification Component A .NET library that provides the flexibility, stability and ease-of-use desired for validation email addresses in your windows forms and ASP.NET projects. Includes C#, VB code examples and sample applications. Validator1.Smtp.MailFrom = "validate@myDomain.com"; //must be set prior to validation ValidationState result = Validator1.Validate("test@someDomain.com"); if (result.Exception == null) MessageBox.Show("Confirmed at the " + result.Progress.ToString() + " level!", "Success!"); else MessageBox.Show(result.Exception.InnerException.Message, result.Exception.Message); Feature Overview Flexibility Seven levels of validation featured Syntax verification is customizable Query mail servers for confirmation of recipients DNS and SMTP sessions are fully configurable Step-by-step, or completion-only, progress options MX Record and domain resolution capabilities Performance Blacklist and Whitelist support Unique "Greenlist" feature for domains that always validate Domain caching options Persistent connections for shared domains Fully developed in managed C# 64-bit OS support Ease-of-Use Complete list validation with a single method call SMTP and DNS protocol knowledge is not required Asynchronous (event-driven) and synchronous (blocking) support Full drag/drop integration within Visual Studio Integrates with Visual Studio 2005, 2008, 2010, 2012 Many sample projects in C# and VB.NET, including ASP.NET Features The PowerTCP Email Validation for .NET installation comes complete with the following: 10 Components/Major Classes. 6 Full Sample projects (in both VB.NET and C#). Full MS Help 2.0 Documentation, including extensive examples. Free Introductory Support. Class Description EmailValidator Component A component that validates an email address or list of email addresses. Dns Class Provides domain name resolution. EnhancedStream Class Adds new methods on top of the Stream interface for type conversion, stream copying, and saving. PipeStream Class Represents a stream that wraps an internal stream. Proxy Class Provides an easy way to manage communication with proxy servers Segment Class Provides a reference to a data segment where data is sent or received over a TCP stream. SegmentedStream Class Used to provide advanced reading/writing capabilities to Stream-based objects. SmtpTester Class A class that encapsulates the SMTP connection in the validation process. TcpStream Class TcpStream implements sending and receiving of data through network sockets. ValidationState Class Represents the result of a validation operation. Supported Environments All PowerTCP for .NET components and classes will operate on any Microsoft operating system that fully supports the Microsoft .NET Framework, including 64-bit Windows. .NET components are dependent on the Framework rather than a specific operating system. Products support .NET Framework versions 1.0, 1.1, 2.0, 3.0, 3.5, 4.0 and 4.5. The components can be used with any .NET compliant language, including the languages below: Supported languages: C# VB.NET Managed C++ Tested in the following application environments: Standard Windows desktop applications Console applications ASP.NET web applications and Web Sites Windows service applications Web service applications Tested in the following development environments: Visual Studio .NET (2005, 2008, 2010, 2012) PowerTCP for .NET components do not currently support execution within Silverlight. If you are interested in using Dart products within your Silverlight solution, contact support@dart.com for more options. Code Examples pullpage Release History Product Release History The following is a list of public releases for all components shipped with PowerTCP Email Validation for .NET (Latest Release 2008-06-16) PowerTCP Email Validation for .NET Current Version: 1.0.4.0 1.0.4.0 Released: 2008-06-16 ASP.NET Sample update. 1.0.3.0 Released: 2008-05-14 Product fixes in this release: Fixed compile problem with ASP.NET samples. 1.0.1.0 Released: 2008-05-05 Product fixes in this release: Addressed problem with Validator component where initialization would fail if default DNS servers were not found on the system. 1.0.0.0 Released: 2007-03-23 Dart Communications is pleased to announce a new addition to the PowerTCP product line. PowerTCP Email Validation for .NET adds tailored email address validation to both traditional desktop and ASP.NET web applications. This powerful product is ideal for any distributed application where validation of an email address or list of email addresses is desired. Mailing list maintenance, sales contact verification, and web form submission are a small sample of applications for this product. Online Documentation pullpage blocking-address-validation-code-example pullpage non-blocking-address-validation-code-example pullpage blocking-address-list-validation-code-example pullpage non-blocking-address-list-validation-code-example Validator .NET Component 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 marshaling 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 ExamplePrivate 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 descriptionEnd Function