473,394 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How can I validate email?

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
10 1944
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
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
"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
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
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
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
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
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
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
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Techy | last post by:
I have two fields in my form so called : invoice and cash Now I want to validate this form on the client side with the help of javascript in such a way that if one of these fields is empy an...
3
by: Martin | last post by:
Hi, I am implemeting a form in asp.net. The form is quite large and the validation is reasonably complex, so I have decieded to implement my own validation rather than use any custon...
3
by: Mike Logan | last post by:
How do I validate messages? If my schema has a simpleType with facets like "minExclusive" and "maxLength" will the .Net framework validate the message before running the web service? This is what...
1
by: Joey | last post by:
Does anyone know how to validate only one certain control in server side code on postback? Instead of Page.Validate() and Page.IsValid, is there some functionality equivalent to...
11
by: jjbutera | last post by:
I know how to use the ErrorProvider in my winforms..or do I? I validate the values and set the ErrorProvider in the validating event. If not valid, I set e.Cancel = True. I clear the ErrorProvider...
11
by: TokyoJ | last post by:
I run a small camp in Alaska for kids and my director is asking for a web form. Could someone please have a look and offer some advice on where I'm making mistake(s)? I'm using the RegExp function...
26
by: webrod | last post by:
Hi, I have some php pages with a lot of HTML code. I am looking for a HTML validator tool (like TIDY). TIDY is not good enough with PHP tags (it removes a lot of php code). Do you have any...
1
by: SkipNRun | last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list. ...
5
by: Ganesh | last post by:
Hi There, I need to validate email address with regular expression control, i tried something like this ^+*@*\.*$ but i need to validate even if it is blank, it should say invalid email,...
24
by: Mike Hofer | last post by:
Please forgive the cross-post to multiple forums. I did it intentionally, but I *think* it was appropriate given the nature of my question. I'm working on an open source code library to help...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.