to validate a email

how can we validate a email is valid or not?
[51 byte] By [vicky_sa] at [2007-11-26 18:39:49]
# 1
> how can we validate a email is valid or not?Send a mail to the address and let the user click on a verification link.Kaj
kajbja at 2007-7-9 6:13:51 > top of Java-index,Java Essentials,Java Programming...
# 2
Also check that there is a substring followed by @ followed by another substring to make sure it isnt a nonsense address.
johan.ga at 2007-7-9 6:13:51 > top of Java-index,Java Essentials,Java Programming...
# 3
u can either use apache commons validator, there is a EmailValidator.isValid() or GenericValidator.isEmail() it checks for valid domains, valid format of the email ids, etc...chk that out...
ganesh_renganathana at 2007-7-9 6:13:51 > top of Java-index,Java Essentials,Java Programming...
# 4

> u can either use apache commons validator, there is a

> EmailValidator.isValid() or

> GenericValidator.isEmail() it checks for valid

> domains, valid format of the email ids, etc...

> chk that out...

I don't know what the GenericValidator does, but the javadoc for EmailValidator says that it will return true on e.g. nobody@noplace.somedog

Kaj

kajbja at 2007-7-9 6:13:51 > top of Java-index,Java Essentials,Java Programming...
# 5
i dont know how effective the EmailValidator is, but there are methods in it like isValidDomain, isValidUser...and I have seen it work when i tried a sample Shale app which uses the commons validator...the GenericValidator is just a wrapper to the EmailValidator...
ganesh_renganathana at 2007-7-9 6:13:51 > top of Java-index,Java Essentials,Java Programming...