473,386 Members | 1,621 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,386 software developers and data experts.

Verify an e-mail-adress - syntax and dns

Has anyone a function/script to verify an e-mail-address?

It should:
a) check the syntax
b) verify an existing mailserver or DNS/MX records

ingo
Sep 24 '06 #1
19 1978
Ingo Linkweiler wrote:
b) verify an existing mailserver or DNS/MX records
"Or"? That's two different things.

If you don't know already: Even if you test all this, it is still
possible that

- the target mail account doesn't exist
- the sender's IP is filtered by the server so he'll reject
- the localpart has syntax errors (allowed chars in the localpart
are up to the server)

Regards,
Björn

--
BOFH excuse #280:

Traceroute says that there is a routing problem in the backbone.
It's not our problem.

Sep 24 '06 #2
Bjoern Schliessmann schrieb:
Ingo Linkweiler wrote:
>b) verify an existing mailserver or DNS/MX records

"Or"? That's two different things.

If you don't know already: Even if you test all this, it is still
possible that

- the target mail account doesn't exist
- the sender's IP is filtered by the server so he'll reject
Yes, I know this.
But its still better than not checking it.
The script will be used as part auf a user registration page to avoid
dummy-inputs like "js********@hdhjdfhjh.net"

Sep 24 '06 #3
In <ef**********@news01.versatel.de>, Ingo Linkweiler wrote:
The script will be used as part auf a user registration page to avoid
dummy-inputs like "js********@hdhjdfhjh.net"
The usual way to cope with this is sending out confirmation mails. No
need to check if the address is syntactically correct beforehand.

Ciao,
Marc 'BlackJack' Rintsch
Sep 24 '06 #4
The usual way to cope with this is sending out confirmation mails. No
need to check if the address is syntactically correct beforehand.
yes, I do this allready. But it would be nice to do some checks before
to avoid wrong user inputs.
Sep 24 '06 #5
Ingo Linkweiler wrote:
yes, I do this allready. But it would be nice to do some checks
before to avoid wrong user inputs.
What do you do if the user inputs a "wrong" address? If you reject
with an error message, the medium intelligent user will enter
something like

sd********@gmx.net

as next try, circumventing your test.

Regards,
Björn

--
BOFH excuse #178:

short leg on process table

Sep 24 '06 #6
Bjoern Schliessmann <us**************************@spamgourmet.comwrite s:
Ingo Linkweiler wrote:
yes, I do this allready. But it would be nice to do some checks
before to avoid wrong user inputs.

What do you do if the user inputs a "wrong" address? If you reject
with an error message, the medium intelligent user will enter
something like

sd********@gmx.net

as next try, circumventing your test.
I believe Ingo is checking for the case where the user intended to
enter a valid email address, and made a typing error resulting in a
trivially invalid one.

--
\ "'Did you sleep well?' 'No, I made a couple of mistakes.'" -- |
`\ Steven Wright |
_o__) |
Ben Finney

Sep 24 '06 #7
Ben Finney wrote:
I believe Ingo is checking for the case where the user intended to
enter a valid email address, and made a typing error resulting in
a trivially invalid one.
Ah. Good intention, but the same applies: Typos in the localpart are
not detectable. Typos in the domain part could mostly be easily
corrected by hand, too.

Regards,
Björn

--
BOFH excuse #297:

Too many interrupts

Sep 24 '06 #8

"Ingo Linkweiler" <in**************@freenet.dewrote in message
news:ef**********@news01.versatel.de...
Bjoern Schliessmann schrieb:
Ingo Linkweiler wrote:
b) verify an existing mailserver or DNS/MX records
"Or"? That's two different things.

If you don't know already: Even if you test all this, it is still
possible that

- the target mail account doesn't exist
- the sender's IP is filtered by the server so he'll reject

Yes, I know this.
But its still better than not checking it.
The script will be used as part auf a user registration page to avoid
dummy-inputs like "js********@hdhjdfhjh.net"
Why bother, you will loose anyway:

For those kind of sites demanding registration for trivial usage (i.e. most
sites do) I use my own domain controlled by myself - the adress is valid for the
confirmation mail then, after I got what I came for (or after I found out that
this site was a waste of time, which happens entirely too often), the adress is
not valid anymore.

Cuts down the spamvertising a lot!
Sep 25 '06 #9
On Sun, 24 Sep 2006 13:23:03 +0200, Ingo Linkweiler wrote:
>The usual way to cope with this is sending out confirmation mails. No
need to check if the address is syntactically correct beforehand.

yes, I do this allready. But it would be nice to do some checks before
to avoid wrong user inputs.
Because you like reinventing the wheel and doing the same work twice?

By memory, in an thread about the same topic just a few days ago, Fredrik
Lundh posted a link to Perl's FAQs that suggests a method for "validating"
email addresses: treat it like a password and ask the user to type it
twice. That will protect against simple typos and input errors.

For everything else, send to it and see what happens.
--
Steven D'Aprano

Sep 25 '06 #10
Steven D'Aprano a écrit :
By memory, in an thread about the same topic just a few days ago, Fredrik
Lundh posted a link to Perl's FAQs that suggests a method for "validating"
email addresses: treat it like a password and ask the user to type it
twice. That will protect against simple typos and input errors.
I hate that thing. When I see that, I type my email once and copy/paste
into the second edit box. This is useless AND annoying at the same time.
Sep 25 '06 #11
Christophe wrote:
Steven D'Aprano a écrit :
>>By memory, in an thread about the same topic just a few days ago, Fredrik
Lundh posted a link to Perl's FAQs that suggests a method for "validating"
email addresses: treat it like a password and ask the user to type it
twice. That will protect against simple typos and input errors.


I hate that thing. When I see that, I type my email once and copy/paste
into the second edit box. This is useless AND annoying at the same time.
Probably safe to say it's a little less useful when the text field
contents are visible, but the classic validator for hidden fields.

It might surprise you to realise that not everyone in the world is a
touch typist, and for them (since they are often looking at the keyboard
rather than the screen) it's not an unreasonable validator.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Sep 25 '06 #12
Christophe wrote:
Steven D'Aprano a écrit :
>By memory, in an thread about the same topic just a few days ago, Fredrik
Lundh posted a link to Perl's FAQs that suggests a method for "validating"
email addresses: treat it like a password and ask the user to type it
twice. That will protect against simple typos and input errors.

I hate that thing. When I see that, I type my email once and copy/paste
into the second edit box. This is useless AND annoying at the same time.
It may be for you, but there certainly are users that misspel their
e-mail address more frequently, just like passwords. And therefore it's a
nice touch to spare both the original submitter and the owner of the
misspelled address more work.

Georg
Sep 25 '06 #13
Georg Brandl a écrit :
Christophe wrote:
>Steven D'Aprano a écrit :
>>By memory, in an thread about the same topic just a few days ago,
Fredrik
Lundh posted a link to Perl's FAQs that suggests a method for
"validating"
email addresses: treat it like a password and ask the user to type it
twice. That will protect against simple typos and input errors.

I hate that thing. When I see that, I type my email once and
copy/paste into the second edit box. This is useless AND annoying at
the same time.

It may be for you, but there certainly are users that misspel their
e-mail address more frequently, just like passwords. And therefore it's a
nice touch to spare both the original submitter and the owner of the
misspelled address more work.
Which proportion of the people that sometimes misspell their e-mail also
use cut&paste when faced with "please type your e-mail twice" web pages?
Sep 25 '06 #14
Steve Holden a écrit :
Christophe wrote:
>Steven D'Aprano a écrit :
>>By memory, in an thread about the same topic just a few days ago,
Fredrik
Lundh posted a link to Perl's FAQs that suggests a method for
"validating"
email addresses: treat it like a password and ask the user to type it
twice. That will protect against simple typos and input errors.


I hate that thing. When I see that, I type my email once and
copy/paste into the second edit box. This is useless AND annoying at
the same time.

Probably safe to say it's a little less useful when the text field
contents are visible, but the classic validator for hidden fields.

It might surprise you to realise that not everyone in the world is a
touch typist, and for them (since they are often looking at the keyboard
rather than the screen) it's not an unreasonable validator.
Well, if they have a hard time using a keyboard, I've no doubts they
will love using cut&paste to cut nearly in half the time needed to fill
out your form :)
Sep 25 '06 #15
Frithiof Andreas Jensen wrote:
For those kind of sites demanding registration for trivial usage (i.e. most
sites do) I use my own domain controlled by myself - the adress is valid for the
confirmation mail then, after I got what I came for (or after I found out that
this site was a waste of time, which happens entirely too often), the adress is
not valid anymore.
and for those that are too lazy for that, there's always mailinator.com
and friends.

</F>

Sep 25 '06 #16
Christophe wrote:
Georg Brandl a écrit :
>Christophe wrote:
>>Steven D'Aprano a écrit :
By memory, in an thread about the same topic just a few days ago,
Fredrik
Lundh posted a link to Perl's FAQs that suggests a method for
"validating"
email addresses: treat it like a password and ask the user to type it
twice. That will protect against simple typos and input errors.

I hate that thing. When I see that, I type my email once and
copy/paste into the second edit box. This is useless AND annoying at
the same time.

It may be for you, but there certainly are users that misspel their
e-mail address more frequently, just like passwords. And therefore it's a
nice touch to spare both the original submitter and the owner of the
misspelled address more work.

Which proportion of the people that sometimes misspell their e-mail also
use cut&paste when faced with "please type your e-mail twice" web pages?
I don't know. But really, it doesn't matter. The cut-and-paste operation
(which is done at least partially using the mouse by most such people) needs
a lot of "eye contact" with the thing cut and pasted, so there's a lot
more chances to realize that the address is wrong.

Georg
Sep 25 '06 #17
On Mon, 25 Sep 2006 16:11:38 +0200, Christophe wrote:
Steven D'Aprano a écrit :
>By memory, in an thread about the same topic just a few days ago, Fredrik
Lundh posted a link to Perl's FAQs that suggests a method for "validating"
email addresses: treat it like a password and ask the user to type it
twice. That will protect against simple typos and input errors.

I hate that thing. When I see that, I type my email once and copy/paste
into the second edit box.
So do I -- even for passwords. (Oooh, I live on the edge... *wink*)

This is useless AND annoying at the same time.
But people like us don't screw up our email address in the first place,
and if we do, we know how to fix it. Not everybody is like us.

--
Steven D'Aprano

Sep 26 '06 #18
Steven D'Aprano a écrit :
On Mon, 25 Sep 2006 16:11:38 +0200, Christophe wrote:
>This is useless AND annoying at the same time.

But people like us don't screw up our email address in the first place,
and if we do, we know how to fix it. Not everybody is like us.
So you say that the better answer is not to teach them to be careful
when they fill those forms. It's to annoy them and teach them to
copy&paste mistakes instead!

Besides, what is so special with electronic forms that we have to go
through all kind of tricks to make sure the user doesn't make mistakes
when regular paper forms just assume the user will be careful when he
fills it? Must be some kind of IQ draining field emited by all the
computers which only computer experts are immune to :D
Sep 26 '06 #19
Besides, what is so special with electronic forms that we have to go
through all kind of tricks to make sure the user doesn't make mistakes
when regular paper forms just assume the user will be careful when he
fills it? Must be some kind of IQ draining field emited by all the
computers which only computer experts are immune to :D
The speciality comes from paper forms being read by humans - or at least
that used to be the case. And as we still are more clever than your average
OCR program (and even than the not-so-average ones), that leads to
comparably good results.

But a computer that is supposed to process an electronic form - you have to
make sure to apply proper bondage techniques to make the user obey to your
command....

Diez
Sep 26 '06 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: vishal | last post by:
how can i verify the email address entered by client??? is there any readily available function for that in php or mysql????? else suggest me some links for verifying email address enetered...
5
by: Dan Williams | last post by:
Apologies for the cross-post but i thought i'd aim for the largest audience possible. I have a web site that users have to register to with their email address. The site then emails the user...
0
by: neuge | last post by:
I am trying to write a Change password process to change user password on an Oracle 8i database with a Powerbuilder client. When the PL/SQL function supplied by Oracle (Verify Password) is...
2
by: Wayne Wengert | last post by:
I want to write a Windows application to go through all the email addresses in an SQL Server table and to report which ones are invalid. From Googling and perusing NGs it is my understanding that...
0
by: CHC | last post by:
Hi, I would like to verify the authenticity of a X509 digital certificate. I'm using Crypt::X509 to create a certificate object and can extract the data fields. But, I can't find a way to verify...
43
by: Xancatal | last post by:
Hey everybody. I need help on this one. I need to verify that a number entered by a user is not either a negative number (-100.00), or an alphabet (a, b, c, X, Y) as well as other number other than...
1
by: Grey | last post by:
I have to write a program to verify email address availability. i have to verify thousand of email address. is there any way to verify the email in ..net instead. the requirement is to verify which...
3
by: Grey | last post by:
I have to write a program to verify email address availability. i have to verify thousand of email address. is there any way to verify the email in ..net instead. the requirement is to verify which...
1
by: rcamarda | last post by:
I have a database backup that our vendor proformed. I dont know if they verified the backup, nor do I have the disk space to create a new backup with verify or retore the current backup. Is...
0
by: Ahmedhussain | last post by:
Hi everyone, I am totally new to IIS. I somehow configured IIS and now whenever I try to add a website, on testing it gives me the error of authorization, i.e. "Cannot verify access to path :...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.