How to connect to a mail server using SSL?

You can try the net/pop module. The one in the current version of Ruby
(1.8.4) doesn't support POP over SSL, but the one in 1.9 does. It can
be gotten via subversion or some source code repository. I read a
report by one guy that had done just that. Don't remember the URL, but
try googling for "ruby pop ssl" and you should find it.