Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

Identify the invalid email addresses

the mail() function

Moderators: macek, egami, gesf

Identify the invalid email addresses

Postby brroopa » Thu Jan 02, 2003 11:29 pm

Problem is that, to identify the invalid email addresses (i have an email table in db with the coloumns email addresses and status). If the user enters invalid email address, that particular account has to be flaged(status=0). How to do this in php?

Help is appreciated
Thanx
brroopa
New php-forum User
New php-forum User
 
Posts: 3
Joined: Thu Dec 26, 2002 3:23 am

Postby 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

Postby brroopa » Fri Jan 03, 2003 2:31 am

Pejone wrote: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...



Sorry, i am not clear with that. I searched for the email verification script in this forum, but couldn't find it. If possible can you please send the code snippet/example for this

Thanx
brroopa
New php-forum User
New php-forum User
 
Posts: 3
Joined: Thu Dec 26, 2002 3:23 am

Postby 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;
}
?>
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 0 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.