HomeCommunityControl GalleryMiscellaneousEmail2.0 Atomic Design Email Validator

2.0 Atomic Design Email Validator



Submit a Review

146 Downloads

6,930 Views


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