-4

Creating a simple web application that will gather information, like name, address, email, etc. and submit it into a database for use with an online contest.

The client has asked if there is a way to verify that the email address the user submits is, in fact, a functional email address. So not just to validate that its formatted correctly, but actually like sending a 'ping' to the email address in order to receive some kind of a response if its valid?

Is this possible? I assume not - but don't know for sure.

Thanks!

blueLabs
  • 1
  • 1
  • 1
    There are either too many possible answers, or good answers would be too long for this format or the answer can be found via [Google](http://www.google.com). Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.I would suggest that you find a development forum (perhaps [quora](http://www.quora.com/Computer-Programming)?) to work out generalities. Then, when/if you have specific coding issues, come back to StackOverflow and we'll be glad to help. – Jay Blanchard Jul 23 '15 at 18:15
  • 1
    duplicate? http://stackoverflow.com/questions/12174029/javascript-verify-email-by-smtp – WhiteHat Jul 23 '15 at 18:16
  • 2
    Send a verification email - That confirms that the email is not only valid, but that the user actually *owns* the email. – Dave Zych Jul 23 '15 at 18:18

1 Answers1

2

When you add the user to the database, send them an email with a link to confirm.

Once they click the link, on that page update the database setting a 'confirmed' field on the database.

The links should contain random string instead of the id. eg example.com/confirm/eh2b8vhwb29vsf

you would store eh2b8vhwb29vsf in the DB as well (indexed) to look up the user, not example.com/confirm/1 otherwise people could easily cycle through and confirm them all.

Hope that helps.

Wizzard
  • 12,582
  • 22
  • 68
  • 101