Improved is_email_address function


function is_email_address_snowMod($address){
//one and only one @ in a validate addr
if ( 1 == substr_count($address,'@') ){
//after @,there are at least one '.'
$pos_of_at = strpos($address, '@');
$pos_of_first_dot = strpos($address, '.', $pos_of_at);
if ($pos_of_first_dot) {
//after @domain. ,there are top domain,which has at least two digits
$top_domain_len = strlen($address) - $pos_of_first_dot - 1;
if ( $top_domain_len >= 2 ) {
return TRUE;
}
}
}
return FALSE;
}