Close Search Box
Search Box

Search: From:

Close
Newsletter

9Tutorials to your Inbox



Determining Whether an Email Account Exists

Determining Whether an Email Account Exists
Author lv1 (2000/5000)
3,477 views
1 Star2 Star3Star4 Star5 Star (5 votes, average: 4.4 out of 5)

A common web application is having users sign up for some service. Often you want to confirm whether the given email truly exists. Realistically, there is only one accurate way of determining whether an email account exists and is active. You must actually send an email to the user and require that the user either respond to it or click a link in it to verify that the user received the email.

Using a link is the better solution because automatic responders could take care of responding to your query. But most of the time, a real person clicks the link. All you need to do is include some information in that link that will identify who the user is. For example, when someone first enters an email address on a web page, the address is stored in a table along with a uniquely generated number. This number is then passed back on the link.

The example in this section uses a simpler solution, not relying on any data storage in the first place. When given the email address, we will manipulate it in various ways before returning it. Then on returning to the confirmation page, the manipulations are reversed to see whether the email is valid. This will be accomplished via a basic mechanism. We will take the email given to us and create a hash value from it, in this case using md5(). However, we will first prepend a value to the string before creating the hash. This way, someone would have to know what that string was to duplicate the hash. First, the tutorial creates a web page that takes the user’s email address and generates the email.

Then, accepts the data from this link and attempts to reverse engineer the hash provided for it.

As it stands this is a simple algorithm. The email address is visible as part of the link, and it is a simple hash algorithm. Therefore if someone really wanted to he might be able to crack this. It would take some effort, though, and therefore this is a good solution for some basic authentication. Again, if more complicated methods are desired, storing data in a database and providing only a unique, random key to the client will give you the better solution that you need.

del.icio.us:Determining Whether an Email Account Exists digg:Determining Whether an Email Account Exists spurl:Determining Whether an Email Account Exists newsvine:Determining Whether an Email Account Exists blinklist:Determining Whether an Email Account Exists furl:Determining Whether an Email Account Exists reddit:Determining Whether an Email Account Exists blogmarks:Determining Whether an Email Account Exists Y!:Determining Whether an Email Account Exists magnolia:Determining Whether an Email Account Exists segnalo:Determining Whether an Email Account Exists
Login




Friends' Sites

Contact Us

Categories

Sponsors

Featured Links

Post a Comment »








Safari hates me

Comment Guidelines

  • Hyperlinks are automatically generated.
  • <em>italic</em>
  • <strong>bold</strong>
  1. Maddy November 1, 2007

    Gr8 ……..
    Its Working Nicely