Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: E-mail

by DamnDirtyApe (Curate)
on Aug 03, 2002 at 22:42 UTC ( [id://187414]=note: print w/replies, xml ) Need Help??


in reply to How to validate E-mail addresses

To do it correctly, it is not a simple regexp. use the Email::Valid module from CPAN.

use Email::Valid; print (Email::Valid->address('maurice@hevanet.com') ? 'yes' : 'no');

_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche

Replies are listed 'Best First'.
Re: E-mail
by hacker (Priest) on Aug 04, 2002 at 20:05 UTC
    As I'm sure you've found out, this will fail on non-RFC compliant addresses that are deliverable (as detailed in recipe 6.19 of The Perl Cookbook), as well as those people from AOL who don't know their own email address (joe@aol, because everyone uses AOL, right?)

    Also, with Email::Valid, you should enable the -mxcheck option and do some SMTP afterwards to verify that what you found, has an actual account on the other side.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-25 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found