WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/is email

Description

Verifies that an email is valid.

Usage

<?php is_email$email ?>

Parameters

$email
(string) (required) Email address to check.
Default: None

Return Values

(string|bool) 
Either returns false or the valid email address.

Examples

if ( is_email( 'email@domain.com' ) ) {
      echo 'email address is valid.';
}

Notes

Does not grok i18n domains. Not RFC compliant.

Change Log

Source File

is_email() is located in wp-includes/formatting.php.

Related

See: Data Validation article for an in-depth discussion of input and output sanitization.

See also index of Function Reference and index of Template Tags.