RE: [PHP] Re: Email Validation built-in? RFC

2005-11-03 Thread bruce
From: Robin Vickery [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 25, 2005 5:31 AM To: php-general@lists.php.net Subject: Re: [PHP] Re: Email Validation built-in? RFC On 10/25/05, Mark Charette <[EMAIL PROTECTED]> wrote: > Ben Litton wrote: > > > You could certainly write an ext

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-25 Thread Robin Vickery
On 10/25/05, Mark Charette <[EMAIL PROTECTED]> wrote: > Ben Litton wrote: > > > You could certainly write an extension to do so. That's what I did > > (mostly I was writing one for another purpose and added a function I > > stole from O'Reilly. > > As you stated in your article, it isn't rfc822 c

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-25 Thread Robin Vickery
On 10/24/05, Manuel Lemos <[EMAIL PROTECTED]> wrote: > on 10/23/2005 07:21 PM Robin Vickery said the following: > >> > >>> ... would it not make sense for there to be a BUILT-IN PHP function of > >>> a TRUE email syntactic validation? > >> I don't see that being much better than passing a good regu

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-24 Thread Mark Charette
Ben Litton wrote: You could certainly write an extension to do so. That's what I did (mostly I was writing one for another purpose and added a function I stole from O'Reilly. As you stated in your article, it isn't rfc822 compliant (it isn't even close). Richard was pretty specific in his

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-24 Thread Manuel Lemos
Hello, on 10/23/2005 07:21 PM Robin Vickery said the following: Checking MX records is not reliable at all. I agree that it is less useful today, but it still help catches many domain name typos. ... would it not make sense for there to be a BUILT-IN PHP function of a TRUE email syntactic val

[PHP] Re: Email Validation built-in? RFC

2005-10-24 Thread Ben Litton
You could certainly write an extension to do so. That's what I did (mostly I was writing one for another purpose and added a function I stole from O'Reilly. You can find the C code I used here: http://www.oreillynet.com/pub/a/network/excerpt/spcookbook_chap03/index3.html. It's pretty clever

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-23 Thread Robin Vickery
On 10/23/05, Manuel Lemos <[EMAIL PROTECTED]> wrote: > Hello, > > > on 10/22/2005 12:58 AM Richard Lynch said the following: > > Checking MX records is not reliable at all. > > I agree that it is less useful today, but it still help catches many > domain name typos. > > > > ... would it not make se

[PHP] Re: Email Validation built-in? RFC

2005-10-22 Thread Manuel Lemos
Hello, on 10/22/2005 12:58 AM Richard Lynch said the following: Checking MX records is not reliable at all. I agree that it is less useful today, but it still help catches many domain name typos. ... would it not make sense for there to be a BUILT-IN PHP function of a TRUE email syntacti

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 2:32 pm, James Benson wrote: > It would be nice to have a php function valid_email or something but > until then i suppose we just make do with what is available, for what > I > need I use the following:- > > eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" > ."@"."([a-z0-9]+([\.-][a-

[PHP] Re: Email Validation built-in? RFC

2005-10-22 Thread James Benson
It would be nice to have a php function valid_email or something but until then i suppose we just make do with what is available, for what I need I use the following:- eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email) Ive never had proble

RE: [PHP] Re: email validation (no regex)

2005-09-22 Thread Michael Sims
J B wrote: > On 9/21/05, Michael Sims <[EMAIL PROTECTED]> wrote: >> Additionally, some mail servers unconditionally accept mail >> addressed to ANY username at their domain, whether that user >> actually exists or not. This is very bad practice, because it >> usually means the accepting MTA is a "

Re: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jasper Bryant-Greene
J B wrote: On 9/21/05, Michael Sims <[EMAIL PROTECTED]> wrote: Additionally, some mail servers unconditionally accept mail addressed to ANY username at their domain, whether that user actually exists or not. This is very bad practice, because it usually means the accepting MTA is a "dumb" hos

Re: [PHP] Re: email validation (no regex)

2005-09-21 Thread J B
On 9/21/05, Michael Sims <[EMAIL PROTECTED]> wrote: > Additionally, some mail servers unconditionally accept mail addressed to ANY > username at their domain, whether that user actually exists or not. This is > very > bad practice, because it usually means the accepting MTA is a "dumb" host > th

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jim Moseby
> -Original Message- > From: Jim Moseby [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 21, 2005 12:21 PM > To: php-general@lists.php.net > Subject: RE: [PHP] Re: email validation (no regex) > > > > > > btw simply checking for a single '@&#x

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Michael Sims
Philip Hallstrom wrote: >>> 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 a

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Philip Hallstrom
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

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Murray @ PlanetThoughtful
> > because you should want/need to validate that the address is correct > prior > > to determining if the email server is up running... > > > > the regex function simply allows you to quickly determine if the address > > is > > valid... doens't mean that it's going to go to an actual live user...!

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jim Moseby
> > btw simply checking for a single '@' with a domain doesn't do > it... what if > the user has '[EMAIL PROTECTED]' or '[EMAIL PROTECTED]'. will your > regex accept/deny > this??? My function will quickly deny those because the DNS lookup for them will immediately fail. Will your regex deny '[

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Murray @ PlanetThoughtful
> because you should want/need to validate that the address is correct prior > to determining if the email server is up running... > > the regex function simply allows you to quickly determine if the address > is > valid... doens't mean that it's going to go to an actual live user...!! > > btw si

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread bruce
anetThoughtful [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 21, 2005 12:01 PM To: 'Jim Moseby'; php-general@lists.php.net Subject: RE: [PHP] Re: email validation (no regex) > > What you have is virtually impossible to determine if all legitimate > possibilities are covere

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Murray @ PlanetThoughtful
> > What you have is virtually impossible to determine if all legitimate > possibilities are covered. > > email validation using regex is a very heavily analyzed subject > > Google "regex email validate" and you'll find loads of expressions. > Look at the Zend article, it provides some insigh

FW: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jim Moseby
(Forwarding private reply to the list) -Original Message- From: Al Rider Sent: Wednesday, September 21, 2005 2:19 PM To: Jim Moseby Subject: Re: [PHP] Re: email validation (no regex) > What you have is virtually impossible to determine if all legitimate possibilities are cove

[PHP] Re: email validation (no regex)

2005-09-21 Thread Manuel Lemos
Hello, on 09/21/2005 02:49 PM Jim Moseby said the following: > I threw together this totally untested and unreliable code to solicit > comments on whether or not this is a good way to validate emails. Consider > the following: > So, what is the general thought about validating email addresses

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jim Moseby
> 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

Re: [PHP] Re: email validation (no regex)

2005-09-21 Thread Ben
Jim Moseby said the following on 09/21/05 11:00: >>>So, what is the general thought about validating email >> >>addresses in this >> >>>manner? >>> >>>JM >> >>Thre is a good reason why virtually everyone uses regex >>patterns for email validating. > > > Excellent start! And that good reason is

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread bruce
a feel for how extensive this task can get... -Original Message- From: Jim Moseby [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 21, 2005 11:01 AM To: 'Al'; php-general@lists.php.net Subject: RE: [PHP] Re: email validation (no regex) > > So, what is the general

RE: [PHP] Re: email validation (no regex)

2005-09-21 Thread Jim Moseby
> > So, what is the general thought about validating email > addresses in this > > manner? > > > > JM > Thre is a good reason why virtually everyone uses regex > patterns for email validating. Excellent start! And that good reason is...? How can regex ensure that the email address that is su

[PHP] Re: email validation (no regex)

2005-09-21 Thread Al
Jim Moseby wrote: I threw together this totally untested and unreliable code to solicit comments on whether or not this is a good way to validate emails. Consider the following: function validate_email($email){ if (str_word_count($email,'@')!=1){return('Not a proper email address');} $par

RE: [PHP] Re: email validation regex

2005-09-17 Thread bruce
.. -bruce -Original Message- From: Robert Paul [mailto:[EMAIL PROTECTED] Sent: Saturday, September 17, 2005 8:06 PM To: php-general@lists.php.net Subject: Re: [PHP] Re: email validation regex Well what does the aforementioned regex seem to miss that Email::Valid catches? --Rob bruce wrote

Re: [PHP] Re: email validation regex

2005-09-17 Thread Robert Paul
ds for now... i haven't run across any php script/regex that's as comprehensive as the perl "Email::Valid" -bruce -Original Message- From: Robert Paul [mailto:[EMAIL PROTECTED] Sent: Friday, September 16, 2005 7:13 PM To: php-general@lists.php.net Subject: [PHP

RE: [PHP] Re: email validation regex

2005-09-17 Thread bruce
rl "Email::Valid" -bruce -Original Message- From: Robert Paul [mailto:[EMAIL PROTECTED] Sent: Friday, September 16, 2005 7:13 PM To: php-general@lists.php.net Subject: [PHP] Re: email validation regex http://www.iamcal.com/publish/articles/php/parsing_email/ The author goes throu

[PHP] Re: email validation regex

2005-09-16 Thread Robert Paul
http://www.iamcal.com/publish/articles/php/parsing_email/ The author goes through RFC822 in detail and writes up a regex that validates emails based on that. It's worked in my experience, but I havn't exactly put it through its paces. --Rob bruce wrote: hi.. looking for a good/working/tes

[PHP] Re: Email validation

2002-06-14 Thread Pedro Pontes
That one does not accept '+'. In fact, that was the 1st time I ever saw such a character in an e-mail address. I did not check the RFC, but if it is valid, just add the '+' char to the reg. exp. like this: function mailCheck($strEMailAddress) { return eregi("^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0

Re: [PHP] Re: Email validation

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Manuel Lemos wrote: > On 06/14/2002 03:06 AM, Miguel Cruz wrote: >> On Fri, 14 Jun 2002, Manuel Lemos wrote: >>> The following classes use this validation regular expression string. >>> It does not exclude some invalid addresses but includes all valid >>> addresses. >>> >>>

Re: [PHP] Re: Email validation

2002-06-13 Thread Manuel Lemos
Hello, On 06/14/2002 03:06 AM, Miguel Cruz wrote: > On Fri, 14 Jun 2002, Manuel Lemos wrote: > >>The following classes use this validation regular expression string. It >>does not exclude some invalid addresses but includes all valid addresses. >> >>"^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~?])+@([-!#\

Re: [PHP] Re: Email validation

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Manuel Lemos wrote: > The following classes use this validation regular expression string. It > does not exclude some invalid addresses but includes all valid addresses. > > >"^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~?])+@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~?]+\\.)+[a-zA-Z]{2,4}\$" It

[PHP] Re: Email validation

2002-06-13 Thread Manuel Lemos
Hello, On 06/13/2002 11:49 PM, Timothy J. Luoma wrote: > On Wed, 12 Jun 2002, Pedro Pontes wrote: > > >>function checkEmail($strEMailAddress) >>{ >> return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", >>$strEMailAddress); >>} >> >>You have it now :). > > > I'm still learni

[PHP] Re: Email validation

2002-06-13 Thread Timothy J. Luoma
On Wed, 12 Jun 2002, Pedro Pontes wrote: > function checkEmail($strEMailAddress) > { > return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", > $strEMailAddress); > } > > You have it now :). I'm still learning my PHP regex... does the above allow someone to have a literal "+" i

[PHP] Re: Email validation

2002-06-12 Thread Manuel Lemos
Hello, On 06/12/2002 01:56 PM, Jeroen Timmers wrote: > Is there a simple function that validate an email adres You may want to try this e-mail validation class that provides different levels of e-mail validation. http://www.phpclasses.org/emailvalidation -- Regards, Manuel Lemos -- PHP

[PHP] Re: Email validation

2002-06-12 Thread Pedro Pontes
function checkEmail($strEMailAddress) { return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", $strEMailAddress); } You have it now :). Regards, Pedro Alberto Pontes "Jeroen Timmers" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is there