Possible duplicate:How to check email in PHP?
Does PHP have a built-in function for determining the correct formatting of email addresses. I know that he cannot go out and check if the email is really active; I am only saying that the email address is structurally correct.
filter_var can do this:
filter_var
$result = filter_var( 'bob@example.com', FILTER_VALIDATE_EMAIL );
It returns falsewhen it fails verification, and otherwise returns an email address.
false