RE: Re: email validation (no regex)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux