Email::Verify::SMTP - Verify an email address by using SMTP.
use Email::Verify::SMTP; # This is important: $Email::Verify::SMTP::FROM = 'verifier@my-server.com'; # Just a true/false: if( verify_email('foo@example.com') ) { # Email is valid } # Find out if, and why not (if not): my ($is_valid, $msg) = verify_email('foo@example.com'); if( $is_valid ) { # Email is valid: } else { # Email is *not* valid: warn "Email is bad: $msg"; }
Email::Verify::Simple is what I came with when I needed to verify several email addresses without actually sending them email.
Email::Verify::Simple
To put that another way:
This module verifies email addresses without actually sending email to them.
Verifies the supplied email address.
If called in scalar context, eg:
my $is_valid = verify_email( $email )
then you get a true or false value.
If called in list context, eg:
my ($is_valid, $why_not) = verify_email( $email )
then you get both a true/false value and any error message that came up.
Default value: <root@localhost>
This is used as the "from" field on the email that is not actually sent. It should be a valid email address on a real domain - just like if you were sending a normal email.
Default value: 0
0
If set to a true value, extra diagnostics will be output to STDERR via warn.
warn
This module depends on the following:
To discover the mail exchange servers for the email address provided.
A nice socket interface to use, even if you're not using Telnet.
John Drago <jdrago_999@yahoo.com>
This software is Free software and may be used, copied and redistributed under the same terms as perl itself.
To install Email::Verify::SMTP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Verify::SMTP
CPAN shell
perl -MCPAN -e shell install Email::Verify::SMTP
For more information on module installation, please visit the detailed CPAN module installation guide.