This is a simple function in PHP to determine if a string is a valid email address.
/**
* Check if a string is a valid email address.
* @param string Email address.
*/
function is_email($address)
{
return (ereg("([[:alnum:]\.\-]+)(\@[[:alnum:]\.\-]+\.+)", $address));
}