AddressValidationLevel Enumeration
Defines levels of e-mail address verification.

Namespace: MailBee.AddressCheck
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public enum AddressValidationLevel
Members
  Member nameValueDescription
RegexCheck0 Check e-mail address syntax only, via regular experssion (can be customized with RegexPattern property). Very fast and does not make any network queries.
DnsQuery1 In addition to syntax check, do DNS MX query against the domain name part of the e-mail address to determine which SMTP MX server is responsible for delivering e-mail to the given domain. Slower than just syntax check but more accurate as invalid domains are filtered out.
SmtpConnection2 In addition to the previous option, make an attempt to connect to the SMTP MX server determined at the previous stage. If multiple MX servers have been detected and the server having the highest priority is not responding, will also try other MXes of this domain, in accordance with their priorities. Slower than just a DNS MX check but more accurate as it filters out the domains with dead SMTP MX servers.
SendAttempt3 This method not just connects to SMTP MX server but also submits the sender and recipient (where the recipients is the e-mail address being examined) to that MX server. The slowest and the most accurate method.
OK4Verify(String) method returns this value when the e-mail address check passed successfully. Has the same meaning for Result property of Verified event.
Remarks

The values of this type can be used as both input parameters (when they define how deeply the e-mail address check should go) and return values (when they show at which stage the verification procedure failed).

For instance, if you set the desired level of verification to, let's say, DnsQuery, it means MailBee will do syntax check and DNS MX query check. If both checks are OK, the return value will be OK. Otherwise, the return value will be the level at which the verification failed. For instance, if it failed at syntax check against a regular expression pattern, the return value will be RegexCheck.

Note Note
Use advanced methods of verification (SmtpConnection and SendAttempt) with care. See below the common pitfalls of e-mail address verification which involves making test SMTP connections.
  • If you're running the check from the machine which does not have a properly configured DNS PTR record (also known as rDNS), many servers will reject connections from you. Most computers sending spam do not have such DNS records and the lack of it makes other servers think you're a spammer.
  • If the IP address of that machine is black-listed in some common RBL databases, you'll get the same results.
  • Many servers may indicate some temporary problems even when you try to submit them a valid address. If you got an SendAttempt error for some e-mail address, try to repeat the check in a few hours and if it fails too, next day. Only 3-4 consequtive SendAttempt failures can prove that the e-mail address is really dead. This only applies to SendAttempt checks. For instance, if the e-mail address has invalid syntax, this is not gonna change if you try again later.
  • Opposite scenario, when SendAttempt passes successfully, it still does not guarantee that the e-mail address is correct as some servers accept any name in their domain as valid address during SMTP session, but later send bounce to the sender. Unfortunately, there is no way to workaround this but to extend your system with some mailbox where bounces will arrive, you'll parse them, extract invalid addresses and remove them from your database. MailBee can provide some help with this, see DeliveryStatusParser class for details.
See Also