2.0 Atomic Design Email Validator
| Submitted On |
November 09, 2006 |
| Updated on |
July 25, 2007 |
| .NET Framework |
2.0 |
| Cost |
$19.99 |
Description
High Performance Email Validation library that can be used with desktop or asp.net applications.
Features: WinForms and ASP.NET support,
Invalid email syntax validation,
DNS lookup,
High Performance,
Bad email address list,
Comma separated validation, and much more! 30 Day guarantee and Free Upgrades for one year!
Syntax Example
private string ValidateAddress(string email)
{
// guard clause
if (String.IsNullOrEmpty(email)) return "Invalid email address (null or empty)";
string result = String.Empty;
// validate the synatx with a regex
if (!Utility.ValidateEmail(email)) return "Invalid email address syntax";
// validate the domain with the nameserver
// strip the string before and including the '@' symbol
string domain = email.Split('@')[1];
try
{
List<MXRecord> mxRecords = Resolver.MXLookup(domain, IPAddress.Parse("205.166.226.38"));
if ((mxRecords != null) && (mxRecords.Count > 0))
{
foreach (MXRecord record in mxRecords)
{
Debug.WriteLine(record.ToString());
}
}
else
{
result = "Invalid Domain";
}
}
catch(Exception e)
{
result = e.Message;
}
return result;
}
Reviews
Submit a review