I have used Email::Valid and it's simple to use as in example below:
use Email::Valid;
sub email_validation {
my $email = shift;
# return true if email address is valid.
return(Email::Valid->address( -address => "$email", -mxcheck => 1 ) ?
'1' : '0');
}
=> -----Original Message-----
=> From: Jim Gibson [mailto:[email protected]]
=> Sent: 27 June 2011 20:04
=> To: Perl Beginners
=> Subject: Re: Verifying an e-mail address
=>
=> On 6/27/11 Mon Jun 27, 2011 11:53 AM, "[email protected]"
=> <[email protected]> scribbled:
=>
=> > I'd like to find a way to check if an e-mail address that is entered
=> on a form
=> > is valid or, at the very least, just not invalid. Checking CPAN, I
=> ran across
=> > a module called Email::Verify::SMTP. Has anyone used this before?
=> If so,
=> > what are your impressions?
=> >
=> > If this is not a good module, what would you recommend?
=>
=> There is a FAQ entry:
=>
=> 'perldoc -q address' "How do I check a valid mail address?"
=>
=> that mentions Email::Valid and RFC::RFC822::Address. I haven't used
=> any of
=> these, so can't recommend any.
=>
=>
=>
=> --
=> To unsubscribe, e-mail: [email protected]
=> For additional commands, e-mail: [email protected]
=> http://learn.perl.org/
=>
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/