Email Id Verification

N

niks

Hello everyone..
I am new to asp.net...
I want to use Regular Expression validator in Email id verification..
Can anyone tell me how to use this and what is the meaning of
this
\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
 
A

alister

Hello everyone..
I am new to asp.net...
I want to use Regular Expression validator in Email id verification..
Can anyone tell me how to use this and what is the meaning of this
\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

this is not really a python question.

I would suggest you locate a good regular expression tutorial & then try
to break it down
otherwise you could try asking in an asp.net forum
 
J

John Nagle

Hello everyone..
I am new to asp.net...
I want to use Regular Expression validator in Email id verification..
Can anyone tell me how to use this and what is the meaning of
this
\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

Not a Python question.

It matches anything that looks like a mail user name followed by
an @ followed by anything that looks more or less like a domain name.
The domain name must contain at least one ".", and cannot end with
a ".", which is not strictly correct but usually works.

John Nagle
 
S

Steven D'Aprano

Hello everyone..
I am new to asp.net...
I want to use Regular Expression validator in Email id verification..

Why do you want to write buggy code that makes your users hate your
program? Don't do it! Write good code, useful code! Validating email
addresses is the wrong thing to do.

The only way to validate an email address is to ACTUALLY SEND AN EMAIL TO
IT. That is all. Just because an address is syntactically valid doesn't
mean it is deliverable.

You can't validate postal addresses. How would you even try? Even if you
could, you wouldn't use a regex for it. That's the post office's job to
decide whether mail can be delivered, not yours. Who are you to say that
some address in Russia or Bolivia or Kuwait is "invalid"?

Email addresses are no different. It is the job of the mail server to
decide whether email can be delivered, not yours.

http://northernplanets.blogspot.com.au/2007/03/how-not-to-validate-email-addresses.html

http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx

http://haacked.com/archive/2007/08/26/dont-be-a-validation-nazi.aspx
 
P

Paul Rubin

Steven D'Aprano said:
Why do you want to write buggy code that makes your users hate your
program? ...
The only way to validate an email address is to ACTUALLY SEND AN EMAIL TO
IT.

Of course spamming people will make them hate you even more. Insisting
that people give you a valid email address (unless you have a
demonstrably legitimate use for it) is a variant of that.
 
S

Steven D'Aprano

Of course spamming people will make them hate you even more. Insisting
that people give you a valid email address (unless you have a
demonstrably legitimate use for it) is a variant of that.

Ha, of course. I assumed that the OP actually has a valid reason for
requesting an email address from the user.
 
P

Paul Rubin

Ben Finney said:
The point is that, having collected the email address, it's useless
unless one actually uses it *as an email address*, by sending a message
to it. Before then, “validating†it tells you nothing.

Right, the only legitimate use of an email address is sending legitimate
email to it. An example might be collecting an address so that service
staff can respond to a help request. If there is not an up-front, good
reason to want to email the address, then collecting it is not
legitimate. An example is web sites where users have to supply
addresses to register. This is why mailinator.com was invented, but
it's annoying even if you use mailinator.
 
G

Grant Edwards

Why do you want to write buggy code that makes your users hate your
program? Don't do it! Write good code, useful code! Validating email
addresses is the wrong thing to do.

I have to agree with Steven. Nothing will make your users swear at
you as certainly as when you refuse to accept the e-mail address at
which the reeive e-mail all day every day.
 
P

Peter Pearson

On Fri, 25 May 2012 13:36:18 +0000 (UTC), Grant Edwards wrote:
[snip]
. . . Nothing will make your users swear at
you as certainly as when you refuse to accept the e-mail address at
which the reeive e-mail all day every day.

Amusingly, every time I log into Discovercard's web site, I
get a red-letter warning that my registered email address is
invalid. Inquiring, I was told that the presence of the
substring "spam" anywhere in the address (including
"@spamcop.net") makes the address invalid in Discovercard's
opinion.
 
J

Jon Clements

I have to agree with Steven. Nothing will make your users swear at
you as certainly as when you refuse to accept the e-mail address at
which the reeive e-mail all day every day.

Ditto.

This would be my public email, but (like most I believe) also have 'private' and work email addresses.

For the OP, just trying to check an email is syntactically correct is okay-ish if done properly. Normally as mentioned you just send a confirmation email to said address with some id and link that confirms (normally with an expiry period). Some mail servers support the "does this mailbox exist?" request, but I fear these days due to spam, most will just say no -- so the only option is to send and handle a bounce (and some don't even send back bounces). And a pretty good way for malicious people to make mail servers think you're trying a DoS.

Although, what I'm finding useful is an option of "auth'ing" with twitter, facebook, google etc... Doesn't require a huge amount of work, and adds a bit of validity to the request.

Jon (who still didn't get any bloody Olympic tickets).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top