Identify the invalid email addresses

the mail() function

Moderators: macek, egami, gesf

Post Reply
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Post by Oleg Butuzov » Fri Jan 03, 2003 12:29 am

with regular expresions...

allowed chars in email is here RFC 821
somewhare here i post email verification script you can find at this forum if you want...

Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Post by Oleg Butuzov » Fri Jan 03, 2003 3:04 am

one minute sciptig and you get simple mail validator =)
this basics, regexp can be dificult =)

Code: Select all

<?
$mail = $HTTP_POST_VARS["mail"];
if (!eregi("[a-z]+@[a-z]+\.[a-z]{2,3}", $mail)) {
onError("mail");
exit;
}
?>

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests