Validating if the inputted email address is real,ASP.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Omg83191
    New Member
    • Aug 2012
    • 21

    Validating if the inputted email address is real,ASP.net

    Hi,
    Anyone who knows how to validate if the email inputted by the new user is a real one.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Real or just looks real? The former is usually done by sending them an e-mail with a link that they click to validate. The latter is usually done by looking for the component parts that make up an e-mail.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      The later can be achieved using a Regular Expressions Validator.

      -Frinny

      Comment

      • PsychoCoder
        Recognized Expert Contributor
        • Jul 2010
        • 465

        #4
        And to help even more here's a good regular expression pattern to use:

        Code:
        ^[a-z0-9_\\+-]+(\\.[a-z0-9_\\+-]+)*@[a-z0-9-]+(\\.[a-z0-9]+)*\\.([a-z]{2,4})$

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          I think the validator has a bunch of predefined regular expressions for email addresses and phone numbers and other things.

          -Frinny

          Comment

          • Omg83191
            New Member
            • Aug 2012
            • 21

            #6
            Guys thank you, Regular Expressions Validator is just for the email format, what I need is to validate if the email really exist because later on I need to send them emails.

            Comment

            • PsychoCoder
              Recognized Expert Contributor
              • Jul 2010
              • 465

              #7
              Well that's a whole different situation (one you should have made when asking the question). What you do is you send a confirmation email to the address they provide with a link to confirm said address.

              At least that's the road I'd go down.

              Happy Coding!

              Comment

              • Omg83191
                New Member
                • Aug 2012
                • 21

                #8
                Sorry I'm new with this, how can I do that?

                Comment

                • Frinavale
                  Recognized Expert Expert
                  • Oct 2006
                  • 9749

                  #9
                  There have been a couple of solutions suggested.
                  Which solution are you asking about?

                  -Frinny

                  Comment

                  • Omg83191
                    New Member
                    • Aug 2012
                    • 21

                    #10
                    How can I send a confirmation email to the address they provide with a link to confirm said address.

                    Comment

                    • Rabbit
                      Recognized Expert MVP
                      • Jan 2007
                      • 12517

                      #11
                      When they register, generate a random, unique key. E-mail the user with a link to a page that passes that key in the link. Create a confirmation page that takes that key and checks which e-mail it is tied to.

                      Comment

                      Working...