Thursday, 15 March 2012

java email validation commons-validator EmailValidation -



java email validation commons-validator EmailValidation -

i utilize use emailvalidator apache common-validator, not developing anymore , not back upwards new domain names, acamedy, radio.

is there replacement or need check email through pattern matching?

you can utilize javamail api

public static boolean isvalidemailaddress(string email) { boolean result = true; seek { internetaddress emailaddr = new internetaddress(email); emailaddr.validate(); } grab (addressexception ex) { result = false; } homecoming result; }

update: found sec alternative, can utilize smtp commands check whether there registered email server in domain! please @ this topic, can find this code , explanation on smtp vrfy commands!

java validation email

No comments:

Post a Comment