Is Email : Mail « Network « C# / C Sharp






Is Email

  

using System.Text.RegularExpressions;

namespace Common.Core
{
    public class Validator
    {
        public static bool IsEmail(string strEmail)
        {
            return Regex.IsMatch(strEmail, @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$");
        }


    }
}

   
    
  








Related examples in the same category

1.SmtpClient: From, Subject, Body, Attachments, To
2.Mail Test
3.A POP3 e-mail checkerA POP3 e-mail checker
4.Fancy Mail Test
5.Mail Attach Test
6.Send Email
7.Send HTML Mail
8.Is Valid Email
9.Is Valid Email Address
10.Sends a MailMessage object using the SMTP settings.
11.Smtp Send