NET Email Validation
NoConnectOptions Property
Example 






KellermanSoftware.NetEmailValidation Namespace > EmailValidation Class : NoConnectOptions Property

A list of predefined options to validate email addresses without using an internet connection. These options are:

BasicSyntax
BlackList
FakeEmailPatternMatcher
DisallowCurseWords
DisallowDisposableEmail
KnownDomainEnding
NotBlank
WhiteList
TypoChecking

Syntax
'Declaration
 
Public Property NoConnectOptions As System.Collections.Generic.List(Of ValidationOptions)
'Usage
 
Dim instance As EmailValidation
Dim value As System.Collections.Generic.List(Of ValidationOptions)
 
instance.NoConnectOptions = value
 
value = instance.NoConnectOptions
public System.Collections.Generic.List<ValidationOptions> NoConnectOptions {get; set;}
public read-write property NoConnectOptions: System.Collections.Generic.List; 
public function get,set NoConnectOptions : System.Collections.Generic.List
public: __property System.Collections.Generic.List<ValidationOptions>* get_NoConnectOptions();
public: __property void set_NoConnectOptions( 
   System.Collections.Generic.List<ValidationOptions>* value
);
public:
property System.Collections.Generic.List<ValidationOptions>^ NoConnectOptions {
   System.Collections.Generic.List<ValidationOptions>^ get();
   void set (    System.Collections.Generic.List<ValidationOptions>^ value);
}
Example
EmailValidation emailValidator = new EmailValidation(); //Trial Mode
//EmailValidation emailValidator = new EmailValidation("place user name here", "place license key here"); //License Mode
 
//Connect using no internet connection
List<ValidationOptions> options = emailValidator.NoConnectOptions;
 
//Validate a single email with no connection to the internet required
Result myResult = emailValidator.ValidEmail("john.smith@hotmail.com", options);
 
//Print the results to the console
Console.WriteLine(myResult.UserMessage);
Console.WriteLine();
Console.WriteLine(myResult.StatusDescription);
Console.WriteLine();
Console.WriteLine(myResult.Log);
Dim emailValidator As EmailValidation = New EmailValidation() 'Trial Mode
'Dim emailValidator As EmailValidation = New EmailValidation("place user name here", "place license key here") 'License Mode
 
emailValidator.FromEmail = "someone@somewhere.com"
emailValidator.FromMailServer = "mail.somewhere.com"
 
'Connect using no internet connection
Dim options As List(Of ValidationOptions) = emailValidator.NoConnectOptions
 
'Validate a single email with no connection to the internet required
Dim myResult As Result = emailValidator.ValidEmail("john.smith@hotmail.com", options)
 
'Print the results to the console
Console.WriteLine(myResult.UserMessage)
Console.WriteLine()
Console.WriteLine(myResult.StatusDescription)
Console.WriteLine()
Console.WriteLine(myResult.Log)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EmailValidation Class
EmailValidation Members