API added to validate emails