NET Email Validation
EnableLogging() Method
Example 






KellermanSoftware.NetEmailValidation Namespace > EmailValidation Class > EnableLogging Method : EnableLogging() Method
Log to the console
Syntax
'Declaration
 
Public Overloads Function EnableLogging() As System.Boolean
'Usage
 
Dim instance As EmailValidation
Dim value As System.Boolean
 
value = instance.EnableLogging()
public System.bool EnableLogging()
public function EnableLogging(): System.Boolean; 
public function EnableLogging() : System.boolean;
public: System.bool EnableLogging(); 
public:
System.bool EnableLogging(); 
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";
 
//Log to the console
emailValidator.EnableLogging();
 
//Connect using the best available options
List<ValidationOptions> options = emailValidator.BestConnectionOptions();
Console.WriteLine(emailValidator.BestConnectionMessage);
 
//Validate a single email with the best available options
Result myResult = emailValidator.ValidEmail("john.smith@hotmail.com", options);
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"
 
'Log to the console
emailValidator.EnableLogging()
 
'Connect using the best available options
Dim options As List(Of ValidationOptions) = emailValidator.BestConnectionOptions()
Console.WriteLine(emailValidator.BestConnectionMessage)
 
'Validate a single email with the best available options
Dim myResult As Result = emailValidator.ValidEmail("john.smith@hotmail.com", options)
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
Overload List