NET Email Validation
DefaultOptions Property
Example 






KellermanSoftware.NetEmailValidation Namespace > EmailValidation Class : DefaultOptions Property

The default options used when email validation is performed. The defaults are:

BasicSyntax
BlackList
FakeEmailPatternMatcher
DisallowCurseWords
DisallowDisposableEmail
KnownDomainEnding
MailboxExists
MailServerExists
NotBlank
SmtpConnect
WhiteList
FailOnQuotaExceeded
TypoChecking

Syntax
'Declaration
 
Public Property DefaultOptions As System.Collections.Generic.List(Of ValidationOptions)
'Usage
 
Dim instance As EmailValidation
Dim value As System.Collections.Generic.List(Of ValidationOptions)
 
instance.DefaultOptions = value
 
value = instance.DefaultOptions
public System.Collections.Generic.List<ValidationOptions> DefaultOptions {get; set;}
public read-write property DefaultOptions: System.Collections.Generic.List; 
public function get,set DefaultOptions : System.Collections.Generic.List
public: __property System.Collections.Generic.List<ValidationOptions>* get_DefaultOptions();
public: __property void set_DefaultOptions( 
   System.Collections.Generic.List<ValidationOptions>* value
);
public:
property System.Collections.Generic.List<ValidationOptions>^ DefaultOptions {
   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
     
emailValidator.FromEmail = "someone@somewhere.com";
emailValidator.FromMailServer = "mail.somewhere.com";
 
//Validate a single email with the best available options
Result myResult = emailValidator.ValidEmail("john.smith@hotmail.com", emailValidator.DefaultOptions);
 
//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"
 
'Validate a single email with the best available options
Dim myResult As Result = emailValidator.ValidEmail("john.smith@hotmail.com", emailValidator.DefaultOptions)
 
'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