I tend to use the following server side code to validate an email address:
bool result = false;
try
{
MailAddress emailAddress = new MailAddress(_EmailAddress);
result = true;
}
catch (Exception)
{
}
return result;
The above is based on many SO posts including this one. My point of difference is whether there is any other way other than doing an actual delivery or online check to further refine what is clearly an invalid email address viz:
The email address a@b.c passes validation and does so as well in the nice simple validator that the author of MimeKit provides.
While that may theoretically a valid email address, in practice it is not. Is my only option here to actually do some form of delivery test to further verify the email address?
Or does someone have another solution? (Preferrably not RegEx).