Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Email Validation, Round 2

by legLess (Hermit)
on Aug 24, 2001 at 23:01 UTC ( [id://107667]=note: print w/replies, xml ) Need Help??


in reply to Re: Email Validation, Round 2
in thread Email Validation, Round 2

You know that Email::Valid uses this same regex, right? It's a nice piece of Perl, but even the module's own POD says:
Please note that there is no way to determine whether an address is deliverable without attempting delivery (for details, see perlfaq 9).
Of course, as I said in my other comment, validity and deliverability are two different things, and sometimes you only need one.
--
man with no legs, inc.

Replies are listed 'Best First'.
(maverick) 3Re: Email Validation, Round 2
by maverick (Curate) on Aug 24, 2001 at 23:27 UTC
    If you read the pod a little more carefully, you'll spot this:
    mxcheck ( <TRUE>|<FALSE> ) Specifies whether addresses passed to address() should be checked for a valid DNS entry. The default is false.
    and this:
    If an error is encountered, an exception is raised. This is really only possible when performing DNS queries. Trap any exceptions by wrapping the call in an eval block: eval { $addr = Email::Valid->address( -address => 'maurice@hevanet.com +', -mxcheck => 1 ); }; warn "an error was encountered: $@" if $@;
    I said that Email::Valid will "verify that the target domain exists", not that the email address is ultimately deliverable.

    /\/\averick
    perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"

      this is what i include in anything
      that needs email validation
      hope its of use
      notice the use of mxcheck!
      use Email::Valid; sub emailvalidate { my $evalid= Email::Valid->address( -address =>$_[0],-mxcheck => 1) ? ' +yes' : 'no'; return $evalid; }
      back in the day we didnt have no old school
      I agree, and I did read the POD carefully. My point was orthogonal to yours, not in opposition to it. (My unstated point was that verifiying the target domain, while a nice and clever feature, is not likely to be very helpful. With all the "typo-squatting" these days, it won't even catch most typos.)

      My last sentence was just an acknowledgement that people use Email::Valid for different purposes, and not all of these purposes necessitate deliverability checking.
      --
      man with no legs, inc.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://107667]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-28 23:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found