By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

How can I validate email?

P: n/a
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 ro*@rogers.net
how can I determine if it is real?
Jul 19 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Could just do a general patter search

some alpha chars + an @ symbol + some alpha chars + a fullstop followed by 2
or 3 letters

that' catch most of it i guess

"michaaal" <re******@verizon.net> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
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 ro*@rogers.net
how can I determine if it is real?

Jul 19 '05 #2

P: n/a
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
ro*@rogers.net 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.

Eric
Jul 19 '05 #3

P: n/a
"Eric Gibson" wrote in message
news:JX****************@bignews6.bellsouth.net...
: 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
: > ro*@rogers.net 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
Jul 19 '05 #4

P: n/a
Where it is in the whole process ?

Sometimes a mail is send at this address and the user have a link to confirm
its subscription. Depends what is the context...

Patrice

--

"Roland Hall" <nobody@nowhere> a écrit dans le message de
news:eu**************@TK2MSFTNGP11.phx.gbl...
"Eric Gibson" wrote in message
news:JX****************@bignews6.bellsouth.net...
: 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
: > ro*@rogers.net 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

Jul 19 '05 #5

P: n/a
Keep it simple - some alphanums, an '@', and some more alphanums with at
least one dot. Don't be tempted to use a full RegEx - it's absolutely
massive.

Alan

"michaaal" <re******@verizon.net> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
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 ro*@rogers.net
how can I determine if it is real?

Jul 19 '05 #6

P: n/a
michaaal wrote:
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
ro*@rogers.net how can I determine if it is real?


There is really only one surefire way to know -- send mail to it and ask for
a response.

You've seen this plenty of times -- you register on a site, but your
registration does not activate until you click a link on the auto-generated
mail that results.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #7

P: n/a
I personally favor the suggestion below, however you'll find this script
does a really good job -
http://javascript.internet.com/forms...alidation.html

Dave Anderson wrote:
michaaal wrote:
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
ro*@rogers.net how can I determine if it is real?

There is really only one surefire way to know -- send mail to it and ask for
a response.

You've seen this plenty of times -- you register on a site, but your
registration does not activate until you click a link on the auto-generated
mail that results.


Jul 19 '05 #8

P: n/a
David,

I tried your website link and tried the sample form on the page.
I didn't seem to get any results - good or bad.

Am I doing something wrong?

Thanks!

"David C. Holley" <Da**********@netscape.net> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
I personally favor the suggestion below, however you'll find this script
does a really good job -
http://javascript.internet.com/forms...alidation.html

Dave Anderson wrote:
michaaal wrote:
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
ro*@rogers.net how can I determine if it is real?

There is really only one surefire way to know -- send mail to it and ask for a response.

You've seen this plenty of times -- you register on a site, but your
registration does not activate until you click a link on the auto-generated mail that results.

Jul 19 '05 #9

P: n/a
Tried it just now and it validated 'TEST' and 'HELLO@' as invalid.

David H

www.gatewayorlando.com

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #10

P: n/a
> I tried your website link and tried the sample form on the page.
I didn't seem to get any results - good or bad.

Am I doing something wrong?


Quite possibly. We can't tell, because you didn't show us exactly what you
tried.

--
http://www.aspfaq.com/
(Reverse address to reply.)
Jul 19 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.