Php function for validating email addresses