Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation of mail id

 
LakshmiNarayana vishnu
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If there is a mai id say: vishnu@xyz.com

How can i validate this mail id in java?
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doing a quick Google search, I found a few solutions to your issue. Do read them and see which you could use/adapt to suit your cause.

http://www.devx.com/tips/Tip/28334
http://www.javapractices.com/Topic180.cjp
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hardly possible at all.
Mail addresses depend on the protocol used, the server implementation used (internal email may well dispense with domains for example in many organisations), etc. etc.
And verifying whether it's an existing address at all is next to impossible anyway, even if it is syntactically correct.
It would involve sending a message and checking whether an answer is received at some point (which may be weeks or months later if the owner of the address is slow to respond, and may never arrive if the owner (like me and ever more people) doesn't respond to such things which are practically only ever used to harvest email addresses for spammer and identity thieves).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic