Check Valid e-mail address
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: Check Valid e-mail address

  1. #1
    Join Date
    Jul 2007

    Question Check Valid e-mail address

    Hi !

    I am developing client application I store client details with e-mail address. but I give permission to users to entry valid e-mail address of every client, In that case I will check valid e-mail address for that how to check the given valid e-mail address please give me a suggestion.

    Thanking You


  2. #2
    Join Date
    Sep 2000

    Re: Check Valid e-mail address

    Found this on the web.

                    Dim BB As System.Text.RegularExpressions.Match = System.Text.RegularExpressions.Regex.Match(Me.tbEMailTo.Text, "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)")
                    If Not BB.Success Then
                        MessageBox.Show("Please enter a valid EMail address.")
                        Exit Sub
                    End If
                Catch ex As Exception
                End Try

  3. #3
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008

    Re: Check Valid e-mail address

    You can check for proper fomratting easy enough but that still does not mean it is a valid email address.

    For example I could enter MyFakeEmail@FakeEmail.Com

    As far as I know the only way to insure a valid email is entered is to send a confirmation to the email address and get a reply.
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center