Click or drag to resize
EmailValidatorBadEmailAddresses Property
An ArrayList of known bad email addresses.

Namespace: NeevSoftware.Components
Assembly: NeevSoftware.EmailValidator (in NeevSoftware.EmailValidator.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
public ArrayList BadEmailAddresses { get; set; }

Property Value

Type: ArrayList
Remarks
Users may sometimes enter a valid email address, but the likely hood of that email address being real is very low. For example, asdf@asdf.com or a@a.com or billg@microosft.com. By adding those emails to the BadEmailAddresses list, they will be considered invalid.
Examples
C#
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();

        }
    }
}
See Also