Programmatically check to make sure an e-mail address is legit.

  • Thread starter Thread starter Mufasa
  • Start date Start date
M

Mufasa

I've seen web sites that check to make sure an e-mail address is valid. How
are they actually doing it? I'd like to integrate that into some code.

TIA - Jeff.
 
No guys - I don't want to check whether the formatting is right. I want to
check if the e-mail address is actually a live e-mail address.

So if somebody tells me that their e-mail address is (e-mail address removed), I
want to check to make sure that that e-mail address does actually exist.

I want something programmatically that does what this does:
http://verify-email.org/

TIA - Jeff.
 
No guys - I don't want to check whether the formatting is right. I want
to
check if the e-mail address is actually a live e-mail address.

So if somebody tells me that their e-mail address is (e-mail address removed), I
want to check to make sure that that e-mail address does actually exist.

There's no 100% reliable way. But you may find this thread useful:
http://groups.google.com/group/micr...read/thread/1080dc6a017e8047/bbe5d3321930326e

(Just ignore my input...I completely misunderstood the original question
and so my replies aren't very helpful :) ).

Pete
 
Using regular expressions is the way to check for a valid form.

Pedant mode: actually, you can't fully check using a regex - there are
some nesting variants in RFC822 that *cannot* be verified with a
single regex. You can, however, check for the common forms
([email protected]) - but this isn't the only legal form.

Actually, the best approach (with registration etc) is to simply send
them an e-mail to the address they have given (tell them you are going
to do this), and in the e-mail provide a link (or code) to use to
indicate that yes: they got the e-mail.

Marc
 
Aside from checking the validity of the syntax of the email address itself
(as others have already pointed out) you can check the DNS "MX" (mail
exchange) record on the domain exists. An email address can be syntactically
valid but still be a bogus address. Once you have the MX record, many mail
servers allow you to query for the existence of a given account.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
 
Hello Mufasa,
No guys - I don't want to check whether the formatting is right. I
want to check if the e-mail address is actually a live e-mail address.

So if somebody tells me that their e-mail address is (e-mail address removed),
I want to check to make sure that that e-mail address does actually
exist.

I want something programmatically that does what this does:
http://verify-email.org/

That tool doesn't work on all domains. For example try any AOL.com address...
it will never tell you it exists.

They try to prevent spammers to bruteforce existing email addresses,

The best way is to actually send an email and get the user to click a link.

Jesse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top