We are using Perl 5, version 18, subversion 1 (v5.18.1) built.
Earlier we were connecting outlook 2007 to connect through Mail::IMAPClient Module using user and password as it wasn't required to use SSL or TLS. Now we have migrated outlook to 2016, and in this version is necessary to introduce SSL or TLS.
I have tried to add SSL code in the Perl script, and it's failing as below:
Can't locate object method "new" via package "IO::Socket::SSL" (perhaps you forgot to load "IO::Socket::SSL"?)
My code:
$client = Mail::IMAPClient->new(
server => $Eserver,
User => $Euser,
Password => $Epassword,
ssl => 1,
port => 993,
Socket => IO::Socket::SSL->new
( Proto => 'tcp',
PeerAddr => $Eserver,
PeerPort => 993, # IMAP over SSL standard port
),
Can someone please help if its right way to add the ssl module in IMAP client. Is it required to upgrade Perl 5 to the latest to use SSL or TLS (using starttls method?).
Also, how can we know which IMAPclient module we are using?
I'm sure something is missing. Not sure as I am naive in working in Perl.