I want to connect to a POP3 server via SSL. I had a look at the Net::POP3 class, and thought that it would only take a few changes to make it work with SSL. So I copied the code, and made the following changes to create a new module to test with...
! package Net::POP3SSL;
use strict;
! use IO::Socket::SSL;
use vars qw(@ISA $VERSION $debug);
use Net::Cmd;
! @ISA = qw(Net::Cmd IO::Socket::SSL);
I tried it and it seemed to work fine. Unfortunately, it doesn't work fine all the time. In some cases, with some servers, it just freezes up. I did a bit of tracking, and it seems to come down to that IO::Socket::SSL sometimes returns a 0 when doing a read. Normally this means an EOF condition, but not necessarily in the SSL case apparently...
Does anyone have a quick and reasonable solution to get this to work, or some variation on Net::POP3 that does work with SSL?
Rob