# Pop over ssl with ruby?

**URL:** <https://rubytalk.org/t/pop-over-ssl-with-ruby/6051>\
**Category:** ruby-talk\
**Created:** [19 May 2003 23:47 UTC](https://rubytalk.org/t/pop-over-ssl-with-ruby/6051 "2003-05-19T23:47:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josef\_Jupp\_SCHUGT](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@Josef\_Jupp\_SCHUGT](https://rubytalk.org/u/Josef_Jupp_SCHUGT)\
**Post date:** [19 May 2003 23:47 UTC](https://rubytalk.org/t/pop-over-ssl-with-ruby/6051/1 "2003-05-19T23:47:31Z")

</div>

Saluton!

Is there an easy way of using net/pop for POP over SSL connections?

The question is not rhetorical, I actually have a POP3 account that  
requires using SSL connections (at the moment I have all messages  
forwarded to another account that does allow unencrypted POP3  
logins).

Gis,

Josef ‘Jupp’ Schugt

> **···**
>
> –  
> e-mails that do not contain plain text, are larger than 50 KiB, are  
> unsolicited, or contain binarys are ignored unless payment from your  
> side or technical reasons give rise to a non-standard treatment.  
> Schroedinger’s cat is not alive.

---

<div class="post-metadata">

**Author:** ![Minero\_Aoki](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@Minero\_Aoki](https://rubytalk.org/u/Minero_Aoki)\
**Post date:** [21 May 2003 01:32 UTC](https://rubytalk.org/t/pop-over-ssl-with-ruby/6051/2 "2003-05-21T01:32:23Z")

</div>

Hi,

In mail “pop over ssl with ruby?”

> **···**
>
> “Josef ‘Jupp’ Schugt” [jupp@gmx.de](mailto:jupp@gmx.de) wrote:
> 
> > Is there an easy way of using net/pop for POP over SSL connections?
> > 
> > The question is not rhetorical, I actually have a POP3 account that  
> > requires using SSL connections (at the moment I have all messages  
> > forwarded to another account that does allow unencrypted POP3  
> > logins).
> 
> I _think_ following script does work. This script is once  
> posted on ruby-list ML and I modify it for ruby 1.6/1.8.  
> (You need to get `openssl’ library from RAA.)
> 
> # 
> 
> # pops.rb
> 
> # 
> 
> require ‘net/pop’  
> require ‘ssl’
> 
> module Net
> 
> class POP3S \< POP3  
> def POP3S.default\_port  
> 995  
> end
> 
> ```
> def POP3S.socket_type
> Net::SSLSocket
> end
> 
> def on_connect
> @socket.ssl_connect
> end
> 
> ```
> 
> end
> 
> end
> 
> – Minero Aoki
