wood burning stoves 2.0*
The moose likes Java in General and the fly likes email address existence verification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "email address existence verification" Watch "email address existence verification" New topic
Author

email address existence verification

Satheeshkumar Subramaniam
Greenhorn

Joined: Jul 06, 2009
Posts: 21
Hi all,

how to check whether email addresses is exist or not ? i mean valid address and domain name.. ( Not syntax format)
looking forward your replies buddies...

Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

There is no 100% guarenteed mechaism to do this. You can check the domain exists easy enough (the classes available in the java.net package give you the functionality you need) outside of that you can't do much more. SMTP doesn't provide a mechism to guarentee delivery failure notices, so some will always fail silently. There are crude spammer techniques, such as using a tracker image to note when a particular email address views an email, but these are well understood and prevented or restricted by most mail user agents nowadays.

So, can't be done. You best bet is to email and hope for a reply, or alternatively let people manage their own email on your system (since presumably are not spamming these people?) which means if they are interested in whatever you are email to them they'll manage this for you.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Satheeshkumar Subramaniam
Greenhorn

Joined: Jul 06, 2009
Posts: 21
hi paul thanks for reply.. but my client needed this functionality.. let me know if there is any freeware java api to do this
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

No there isn't. This is because of the reason I stated earlier: there is no guarenteed mechanism in SMTP to support it. Any API is going to have to be built on top of SMTP.
Fred Hamilton
Ranch Hand

Joined: May 13, 2009
Posts: 679
I'd say Paul is correct, It is long known that there is no sure fire way to do this and there never has been, and that answer has nothing to do with java. Best you can do is send out an email to the address, and if doesn't return marked undeliverable, then assume the address exists.
Satheeshkumar Subramaniam
Greenhorn

Joined: Jul 06, 2009
Posts: 21
hi fred,paul thanks..otherwise shal i get failed delivery notice for bouced mails using javamail API? any code regarding this
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10426
    
    8

Paul has already answered this in his very first post.
SMTP doesn't provide a mechism to guarentee delivery failure notices, so some will always fail silently.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Correct. On my domain, I can specify a "black hole" for non-valid email addresses. This means that they neither get delivered nor bounced.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
The Apache James mail server docs recommended the black hole approach. Bounced mail verifies that there is a mail server at an address, encouraging more attacks.

Bill
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

this is a frequently asked question. The answer is given upthread. Nope, can't do it.

Other than sending a real message and requiring the user to reply, then reading the reply.

Its a feature
 
GeeCON Prague 2014
 
subject: email address existence verification