Mail-Box-POP3
view release on metacpan or search on metacpan
lib/Mail/Transport/POP3.pm view on Meta::CPAN
use parent 'Mail::Transport::Receive';
use strict;
use warnings;
use Log::Report 'mail-box-pop3', import => [ qw/error fault __x/ ];
use IO::Socket ();
use IO::Socket::IP ();
use IO::Socket::SSL qw/SSL_VERIFY_NONE/;
use Socket qw/$CRLF/;
use Digest::MD5 qw/md5_hex/;
use MIME::Base64 qw/encode_base64/;
#--------------------
sub _OK($) { substr(shift // '', 0, 3) eq '+OK' }
sub init($)
{ my ($self, $args) = @_;
lib/Mail/Transport/POP3.pm view on Meta::CPAN
# Check if we can make a connection
my ($host, $port, $username, $password) = $self->remoteHost;
$username && $password
or error __x"POP3 requires a username and password.";
my $socket;
if($self->useSSL)
{ my $opts = $self->SSLOptions;
$socket = eval { IO::Socket::SSL->new(PeerAddr => "$host:$port", %$opts) };
}
else
{ $socket = eval { IO::Socket::IP->new("$host:$port") };
}
$socket
or fault __x"cannot connect to {service} for POP3", service => "$host:$port";
# Check if it looks like a POP server
lib/Mail/Transport/POP3.pod view on Meta::CPAN
=item proxy => $path
=item retry => $count|undef
=item ssl_options => HASH
Unless overruled, C<verify_hostname> will be set to C<false> and
C<SSL_verify_mode> to C<SSL_VERIFY_NONE}>
You can also set the SSL parameters via IO::Socket::SSL subroutine set_defaults.
Connections will get restarted when they are lost: you have to keep the
defaults in place during POP actions.
=item timeout => $span
=item use_ssl => BOOLEAN
=item username => $username
=item via => CLASS|$name
( run in 0.663 second using v1.01-cache-2.11-cpan-1d5ca39e368 )