Net::SMTP::Verify - verify SMTP recipient addresses
version 1.04
use Net::SMTP::Verify; my $v = Net::SMTP::Verify->new; my $resultset = $v->check( 100000, # size 'karl@senderdomain.de', # sender 'rcpt1@rcptdomain.de', # 1 or more recipients... 'rcpt2@rcptdomain.de', 'rcpt3@rcptdomain.de', ); # check overall status $resultset->is_all_success; # check a single result $resultset->rcpt('rcpt1@rcptdomain.de')->is_success; $resultset->rcpt('rcpt1@rcptdomain.de')->smtp_code; $resultset->rcpt('rcpt1@rcptdomain.de')->smtp_message; $resultset->rcpt('rcpt1@rcptdomain.de')->has_starttls; $resultset->rcpt('rcpt1@rcptdomain.de')->has_tlsa; # more ways to retrieve results by status... $resultset->successfull_rcpts; $resultset->error_rcpts; $resultset->temp_error_rcpts; $resultset->perm_error_rcpts;
This class implements checks for verifying SMTP addresses.
It implements the following checks:
Check if the MX would accept mail for test addresses.
If the mail exchanger (MX) supports the SIZE extension and a size is given the module will pass the message size with the MAIL FROM command.
This will check if the message would exceed message size limits or recipients quotas on the target MX.
It will check if the STARTTLS extension required to enstablish encrypted TLS connections is supported by the target MX.
The module could check if a TLSA record has been published for the target MX server.
If such a record has been published the target MX SSL certificate could be verified with DANE.
Query this smtp server instead of the MX records.
Use a different port.
Use a helo_name other than the hostname of the system.
Use this timeout for the SMTP connection.
Use a custom Net::DNS::Resolver object.
The default is:
Net::DNS::Resolver->new( dnssec => 1, adflag => 1, );
The dnssec and adflag is required for the TLSA check.
Set to 1 to activate TLSA lookup.
Set to 1 to activate OPENPGPKEY lookup.
Set a callback to retrieve log messages.
If set to 1 it will set a logging_callback method to output logs to STDERR.
Tries to resolve a MX to an hostname.
It will choose the first record with the highest priority listed as MX.
When a host is MX for multiple domains it will try to reuse the same host for checks.
Check if a TLSA record is available.
Performs check and returns a Net::SMTP::Verify::ResultSet.
Markus Benning <ich@markusbenning.de>
This software is Copyright (c) 2015 by Markus Benning <ich@markusbenning.de>.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
To install Net::SMTP::Verify, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::SMTP::Verify
CPAN shell
perl -MCPAN -e shell install Net::SMTP::Verify
For more information on module installation, please visit the detailed CPAN module installation guide.