You are here: RE: [PHP] Re: email validation (no regex) « PHP « IT news, forums, messages
RE: [PHP] Re: email validation (no regex)

Posted by Jim Moseby on 09/21/05 21:30

> jim...
>
> validating email means different things to different people...

True, but for the most part people just want to know whether a user has
entered a real working email address into their forms. What better test
than to try to send an email to it?

>
> but there's no way you're going to be able to 'throw'
> together something in
> 2-3 days that others have taken years to create/refine...

I threw the example I posted together in about 10 minutes (and it shows :).
Even though I'm not at a place where I can test it right now, I think it
will work with some tweaking.


> if you only want to determine if an email address is valid,
> what does that
> mean to you? are you following the current/latest rfc 2822 (i think)
> standard? or are you just trying to get a quick halfway ok function...

Of course the SMTP standard would have to be followed, I typed what you see
from memory, just as a conceptual model.

>
> as an example, i was looking at a way of using a
> regex/function for email
> validation for a user input form... i decided that it was
> simply too tough
> to deal with the various nuances, and chickened out, using a
> combination
> perl/php approach...

So what do you get from them that my function would not give you?

>
> but you could do what you want to do. however, it's going to
> be painful if
> you want it to match the rfc spec...

Really? Why does it need to be painful? I just need to do a 'EHLO', 'Mail
From:' and 'RCPT to:' and 'QUIT'. It's not going to actually send an email.
Seems simple to me. Maybe there's something else in the spec that I don't
see?

>
> good luck...
>

Thanks. :o)

> ps. take a look at perl's email::valid function if you want
> to get a feel
> for how extensive this task can get...

My question is "why does it have to be so complicated?" SMTP servers are
the best email validation devices known to man. Why not let them do the
dirty work?

JM <-- playing devils advocate :o)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация