- COPYRIGHT AND LICENSE
Net::SMTP::Verify - verify SMTP recipient addresses
use Net::SMTP::Verify; my $v = Net::SMTP::Verify->new; my $resultset = $v->check( 100000, # size 'email@example.com', # sender 'firstname.lastname@example.org', # 1 or more recipients... 'email@example.com', 'firstname.lastname@example.org', ); # check overall status $resultset->is_all_success; # check a single result $resultset->rcpt('email@example.com')->is_success; $resultset->rcpt('firstname.lastname@example.org')->smtp_code; $resultset->rcpt('email@example.com')->smtp_message; $resultset->rcpt('firstname.lastname@example.org')->has_starttls; $resultset->rcpt('email@example.com')->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 addresses with SMTP MAIL FROM and RCPT TO commands
Check if the MX would accept mail for test addresses.
- check of message size
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.
- check if MX could handle TLS connections
It will check if the STARTTLS extension required to enstablish encrypted TLS connections is supported by the target MX.
- check if TLSA record is available
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 <firstname.lastname@example.org>
This software is Copyright (c) 2015 by Markus Benning <email@example.com>.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991