• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

verification of existence of email id

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Could any one of u pl suggest a way to verify the existence of an e mail Id using java code.

Thanks
Dinesh Babu.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can check if it is a VALID email address by checking it against the corresponding RFC.
This mainly means there must be an @-sign somewhere in there with something in front and behind.
Then you could try a DNS lookup of the part after the @-sign. If that doesn't exist it's pointing to a non-existing domain and would therefore never arrive (not quite sure here, it is possible that for example dummy.somisp.sometld would arrive is only somisp.sometld is a valid DNS entry).
The part in front of the @-sign you can only determine the validity of by actually trying to send to the address. If you get a bounce (which may take a long time to arrive, some mailservers try repeatedly for a day or more to deliver in case a client address is only temporarilly unavailable) the address certainly does not exist.
If you get no bounce someone has received your message, but that may well be a blacklist and no recipient will ever read it.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Welcome to JavaRanch!
The SMTP standard includes a "VRFY" command which you used to be able to use to verify whether an email address was valid at a particular host. Nowadays, virtually all sites implement this as a no-op, so it's pretty much useless.
The only way that works is to send an email to the address containing a unique URL. The email should instruct the recipient to visit the URL. A servlet at the URL can then record that the corresponding email is valid.
 
reply
    Bookmark Topic Watch Topic
  • New Topic