Email address check function

Gerrit Holl gerrit.holl at pobox.com
Thu Dec 2 10:33:34 EST 1999


Hello,

I'm writing some CGI scripts and I want the user to fill in their real email
address. Checking this is more difficult than just look if it contains an '@'.
There must be at least one '.' after the '@' but there must be non-'@' chars
before and after every '.', no white space, etc. There must be an RFC for
this, but is there a function in the standard library that checks if it's
OK?

I very often get messages from my MTA that it's received a message with a
wrong Message ID. One could also type an entirely wrong email address in the
form, and I want to attend the user on that.

regards,
Gerrit.

-- 
"The world is beating a path to our door"

  -- Bruce Perens, (Open Sources, 1999 O'Reilly and Associates)
  3:30pm  up  2:03, 16 users,  load average: 0.32, 0.56, 0.80




More information about the Python-list mailing list