Advanced email validation component for Microsoft .NET
var engine = new VerificationEngine(); // Check a known disposable address var result = engine.Run("badmail@mailinator.com", VerificationLevel.Mailbox).Result; switch (result.LastStatus) { case VerificationStatus.DomainIsWellKnownDea: // Well-known disposable email address provider break; case VerificationStatus.MailExchangerIsWellKnownDea: // Well-known disposable email address provider host break; case VerificationStatus.MailboxIsDea: // Disposable mailbox, from a regular email provider break; }
var engine = new VerificationEngine(); // Avoid aborting on disposable email address failures engine.DefaultSettings.TreatDeaFailuresAsFatal = false; // Check a known disposable address var result = engine.Run("badmail@mailinator.com", VerificationLevel.Mailbox).Result; if (result.IsDisposableEmailAddress == true) { // In this case, the validation process continued even after the // disposable email address has been detected... }