Net::POP3S - SSL/STARTTLS support for Net::POP3
use Net::POP3S; my $ssl = 'ssl'; # 'ssl' / 'starttls'|'stls' / undef my $pop3 = Net::POP3S->new("pop.example.com", Port => 995, doSSL => $ssl);
This module implements a wrapper for Net::POP3, enabling over-SSL/STARTTLS support. This module inherits all the methods from Net::POP3. You may use all the friendly options that came bundled with Net::POP3. You can control the SSL usage with the options of new() constructor method. 'doSSL' option is the switch, and, If you would like to control detailed SSL settings, you can set SSL_* options that are brought from IO::Socket::SSL. Please see the document of IO::Socket::SSL about these options detail.
Just one method difference from the Net::POP3, you may select POP AUTH mechanism as the third option of auth() method.
As of Version 3.10 of Net::POP3(libnet) includes SSL/STARTTLS capabilities, so this wrapper module's significance disappareing.
A few options added to Net::POP3(2.X).
doSSL { ssl | starttls | undef } - to specify SSL connection type. ssl makes connection wrapped with SSL, starttls uses POP3 command STLS.
ssl
starttls
STLS
SSL { 0 | 1 } - 1 means the same as doSSL to ssl, 0 is just initialize SSL libraries internally for using starttls later.
1
0
Most of all methods of Net::POP3 are inherited as is, except auth().
Attempt SASL authentication through Authen::SASL module. AUTHMETHOD is your required method of authentication, like 'CRAM-MD5', 'LOGIN', ... etc. the default is 'CRAM-MD5'.
Upgrade existing plain connection to SSL. If you use this, you must create instance like,
$smtp = Net::POP3S->new($host, SSL => 0, ...);
Net::POP3, IO::Socket::SSL, Authen::SASL
Tomo.M <tomo at cpan org>
Copyright (C) 2017 by Tomo.M
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Net::POP3S, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::POP3S
CPAN shell
perl -MCPAN -e shell install Net::POP3S
For more information on module installation, please visit the detailed CPAN module installation guide.