EmailValidatorBadEmailAddresses Property |
Namespace: NeevSoftware.Components
using System; using System.Collections; using NeevSoftware.Components; namespace csTest { class Class1 { static void Main(string[] args) { EmailValidator.LicenseKey = "Paste License Key Here."; EmailValidator mx = new EmailValidator(); //log the session mx.LogInMemory = true; //set bad addresses mx.BadEmailAddresses = new ArrayList(); mx.BadEmailAddresses.Add( "test@test.com" ); mx.BadEmailAddresses.Add( "a@a.com" ); mx.BadEmailAddresses.Add( "test@hotmail.com" ); //set the email address string EmailAddress = "test@hotmail.com"; //validate if( mx.Validate( EmailAddress )) { Console.WriteLine( "Valid Email Address"); } else { Console.WriteLine( "Not Valid Email Address"); } Console.WriteLine( "Here is the session log"); Console.WriteLine( mx.SmtpTranscript ); Console.ReadLine(); } } }