in message
: michaaal wrote:
: > I realize this is not solely an ASP question, but I thought you guys
: > might know the answer and I couldn't find anywhere else to post this.
: > If you have suggestions for this I am more than happy to post
: > somewhere else.
: >
: > How can I, using ASP code, validate whether or not an email address
: > is a real one? For example, if I have the email address called
: > (e-mail address removed) how can I determine if it is real?
:
: I had the same question 6 months ago, and came to the conclusion here are
3 levels
: to this:
:
: 1) To do a regexp on the email to determine if it matches syntax for a
valid email
: address.
:
: Note: To really get the most fine-grained results you'd have to
tokenize the
: email address according to the RFC. You'd be surprised what's a valid
email, and
: what's not.
:
: 2) Check the MX records of the domain of the email to make sure it's a
valid domain,
: and is accepting email.
:
: 3) Actually connect to the MX in question, and ask the server if it's an
address.
:
: There a few options. If you want to use VBScript there are a few tutorials
on the
: internet... but they aren't nearly as well defined as the commercial
offerings. I
: bought
http://www.hexillion.com/hg/HexValidEmail/, and it's great. It's
simple...
: and pretty cheap. For how much time I saved it was worth it.
:
: You could use PerlScript in the ASP environment, and Perl has many modules
that
: effeciently do all three of these things, and they are free. So if you
have
: perlscript on your system and know how to install modules, go to
:
http://search.cpan.org and figure out which ones you'll need.
This still won't be a definite since there are catch-all email accounts now.
Try it with AOL, and you'll see all email addresses respond as valid.
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp