[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Single Page

Top Document: FAQ: Frequently Asked Questions about CGI Programming
Previous Document: 3.3 "But I saw some.kool.site display my email address..."
Next Document: 3.5 Subject: How can I get the hostname of the remote user?


3.4 Can I verify the email addresses people enter in my Form?



Unfortunately people will sometimes enter an incorrect or invalid
email address in your Form.   Worse, they may enter a valid but
incorrect email address that will deliver to someone who doesn't
want your mail.

Proposed regexps to match email addresses are sometimes posted.
Most of these will fail against perfectly valid email addresses,
like "S=N.OTHER/OU1=X12345A/RECIPNUM=1/MTA-BASIC@attmail.com"
(which is what your address looks like if you are connected to
the Internet via X400 - and if you think that example is too easy,
check the ones at the end of Eli the Bearded's Email Addressing FAQ).

Probably the most complete parser and checker available for download
is Tom Christiansen's, at
http://www.perl.com/CPAN/authors/Tom_Christiansen/scripts/ckaddr.gz
Of course, this still says nothing about deliverability.

A frequently-suggested hack that doesn't work is to use
SMTP EXPN or VRFY commands.   Modern versions of sendmail permit
administrators to disable these commands, and many sites take
advantage of this facility to protect their users' privacy.

Probably the best way to verify an email address is to send mail to
it, asking the user to respond.   Include a clause like "if you have
received this mail in error, please accept our apologies..."




Top Document: FAQ: Frequently Asked Questions about CGI Programming
Previous Document: 3.3 "But I saw some.kool.site display my email address..."
Next Document: 3.5 Subject: How can I get the hostname of the remote user?

Single Page


[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
Nick Kew <nick@webthing.com>

Last Update November 22 2008 @ 00:13 AM

© 2008 FAQS.ORG. All rights reserved.