Here we are discussing about the situation when we need to check whether an email we are using is valid or not. As we know wordpress has so many predefined useful functions, in the same reference we are discussing about another useful function of wordpress.

To check the validity of an email address we can use :

<?php 
is_email( $email ); // where $email is a variable having email address which we are checking
?>

This function will return valid email address in one case and return “FALSE” in other case. We can better use this function in below mentioned way :

<?php

$email = 'testemail@gmail.com'; // email address which we are verifying
if ( is_email( $email ) ) {
      echo 'valid email.';
}else {
      echo 'not a valid email';
}

?>

In this reference, if you want to check whether a email address exists in wordpress database or not then check here : Check a email exists in wordpress