Library for simple checks if an email or host address is listed in https://github.com/ivolo/disposable-email-domains
using DisposableEmailDomainsCheck;
//...
String [] toCheck = { "[email protected]", "mydomain.com", "[email protected]" };
do
{
Console.WriteLine(DisposableEmailDomains.State.ToString() + " | Waiting...");
Thread.Sleep(2000);
} while (!DisposableEmailDomains.IsReady);
Console.WriteLine("Index state: " + DisposableEmailDomains.State.ToString());
foreach (var hostOrEmail in toCheck)
{
bool isListed = DisposableEmailDomains.Contains(hostOrEmail);
Console.WriteLine(hostOrEmail + " is listed: " + isListed);
}
Console.ReadKey();