Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2697

Re: What this means "(\w|-)+@\w"?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From "Peter H. Coffin" <hellsop@ninehells.com>
Newsgroups comp.lang.php
Subject Re: What this means "(\w|-)+@\w"?
Date Tue, 2 Aug 2011 07:56:08 -0500
Organization A noiseless patient Spider
Lines 33
Message-ID <slrnj3fsv8.icc.hellsop@nibelheim.ninehells.com> (permalink)
References <b2cdc780-b6d4-4b6e-a01e-444a616c0fe0@r18g2000vbs.googlegroups.com> <iv68tf$fla$1@dont-email.me> <mr-0FA206.10061702082011@News.Individual.NET> <j18h8j$eg3$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Injection-Info mx04.eternal-september.org; posting-host="le/2G4+BNpieVhQI6uJ2Lw"; logging-data="30328"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19yjaF8Bjwu9m4fLzBrtiA0"
User-Agent slrn/0.9.9p1 (OpenBSD)
Cancel-Lock sha1:yYvYkPyrKu0onuCM+znBcUO/2GA=
Xref x330-a1.tempe.blueboxinc.net comp.lang.php:2697

Show key headers only | View raw


On Tue, 02 Aug 2011 11:50:09 +0200, ?lvaro G. Vicario wrote:
> El 02/08/2011 10:06, Sandman escribi?/wrote:
>> What's wrong with the PHP built in email validator?
>>
>> <?
>>      if (filter_var($email, FILTER_VALIDATE_EMAIL)){
>>          # Do fancy stuff, such as sending fancy email!
>>      }
>> ?>
>
> For instance:
>
> var_dump(filter_var('webmaster@?lvaro.es', FILTER_VALIDATE_EMAIL));
> var_dump(filter_var('webmaster@asxn--lvaro-wqa.es', FILTER_VALIDATE_EMAIL));
>
> bool(false)
> bool(false)

Several years ago, I wrote an email validator that worked fairly will,
and handled address cases that hadn't even been thought of yet. It used
telnet to fake being a MTA to the MX of record for the domain through
enough steps to ask if the receiving MTA would actually accept mail for
the address, but stopping short of actually sending anything.

It was, however, really slow, to start up. Once it had everything cached
up, it could average a couple of email addresses being validated per
second, but the first few hundred took a half hour or so.

I wonder what happened to that code....

-- 
The plural of datum is not "facts".
A collection of facts is not "knowledge".

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What this means "(\w|-)+@\w"? zhang yun <bigzhangyun@gmail.com> - 2011-07-07 06:58 -0700
  Re: What this means "(\w|-)+@\w"? Michael Fesser <netizen@gmx.de> - 2011-07-07 17:39 +0200
  Re: What this means "(\w|-)+@\w"? Eli the Bearded <*@eli.users.panix.com> - 2011-07-07 18:23 +0000
    Re: What this means "(\w|-)+@\w"? Michael Fesser <netizen@gmx.de> - 2011-07-07 21:12 +0200
    Re: What this means "(\w|-)+@\w"? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-07-07 21:12 +0200
      Re: What this means "(\w|-)+@\w"? Eli the Bearded <*@eli.users.panix.com> - 2011-07-08 06:05 +0000
  Re: What this means "(\w|-)+@\w"? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-07-08 08:42 +0200
    Re: What this means "(\w|-)+@\w"? Sandman <mr@sandman.net> - 2011-08-02 10:06 +0200
      Re: What this means "(\w|-)+@\w"? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-08-02 11:50 +0200
        Re: What this means "(\w|-)+@\w"? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-08-02 07:56 -0500
          Re: What this means "(\w|-)+@\w"? Eli the Bearded <*@eli.users.panix.com> - 2011-08-02 20:53 +0000
            Re: What this means "(\w|-)+@\w"? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-08-03 08:32 -0500
          Re: What this means "(\w|-)+@\w"? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-08-03 10:55 +0200
            Re: What this means "(\w|-)+@\w"? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-08-03 08:46 -0500
        Re: What this means "(\w|-)+@\w"? Sandman <mr@sandman.net> - 2011-08-03 00:21 +0200
          Re: What this means "(\w|-)+@\w"? Eli the Bearded <*@eli.users.panix.com> - 2011-08-03 07:45 +0000
            Re: What this means "(\w|-)+@\w"? Sandman <mr@sandman.net> - 2011-08-03 10:02 +0200
              Re: What this means "(\w|-)+@\w"? Eli the Bearded <*@eli.users.panix.com> - 2011-08-05 00:05 +0000

csiph-web