• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to check for valid email id?

 
An Sush
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to check for validity of a mail id(i mean correctness of a email id and not merely the format)
I can write regex code to check for proper format of mail like
@abc.com is invalid where as xyz@abc.com is a valid format
but how do i make sure that xyz@abc.com is a correct mail id (existent mail id) in java mail api?

Any workarounds and possible solutions highly appreciated.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can check validity of any mail address by calling a Web service. One web service for this I knew can be found here.

Or Googled the problem.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Apache Commons Validator library has a class for doing that.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:The Apache Commons Validator library has a class for doing that.


Hmm, Apache Commons. Its good library, I don't know that.. Thanks Ulf.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!