http://www.perlmonks.org?node_id=1025404


in reply to Mail::IMAPClient->new hangs in Windows

For Windows, try SSLv2; also, SSL_verify_none is the default, so why write it longhand?
#!/usr/bin/perl use strict; use warnings; use IO::Socket::SSL; use Mail::IMAPClient; my $client = Mail::IMAPClient->new( Server => 'imap.gmail.com', Port => 993, Ssl => 1, User => 'whateverUser', Password => 'aG00dP455w0rd', Socket => IO::Socket::SSL->new( Proto => 'tcp', PeerAddr => 'imap.gmail.com', PeerPort => '993', SSL_version => 'SSLv3', SSL_verify_mode => 0), ); die $! unless print "Connected\n";
Updated: Fixed typo.