Glossary Item Box

PowerTCP Email Validation for .NET

Quick Start

First, compile and run the provided sample applications. These application demonstrate most features of the Email Validation product. Now you are ready to code something up for yourself!

  1. Start Visual Studio and make a new Windows Forms application. ASP.NET can also be used, but this example will be a Windows Forms application. We are using Visual Studio version 1 for the examples in this documentation.
  2. If the Validator component is not yet inserted into the "Components" section of your Visual Studio Toolbox, just right-click on your Toolbox and add the component (if you sort by namespace it is easy to find as part of the Dart.PowerTCP namespace).
  3. Once added to the Toolbox, select the component and insert it onto the main form. You will now see a small icon below the form labeled "Validator1" (under C#). Insert a "using Dart.PowerTCP.Validator" line at the beginning of the main.cs file.
  4. Now add a button to your form.
  5. Double-click on the button, and add the following code:
[C#]
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("The email address was confirmed at the " + result.Progress.ToString() + " level!", "Success!");
else
        MessageBox.Show(result.Exception.InnerException.Message, result.Exception.Message); 

It is that easy! From this simple scenario you can add complexity, such as validating lists of emails, using the whitelist and blacklist, using test accounts, and using the domain cache. If you're not using Visual Studio, you can still use PowerTCP just like you would any other product. Thank you for choosing PowerTCP!

 

Related Sections

Quick Start
Provides information for getting started quickly.
Getting Started
Provides an overview of the product and discusses such topics as distribution, licensing, and support.
Using the Email Validator
Discusses how to use the Validator component to validate email addresses.
Assembly Overview
Provides a language/syntax reference.
Samples
Lists the included samples.

 

 


Send comments on this topic.

Documentation version 1.0.3.0.

© 2008 Dart Communications.  All rights reserved.