# POP email with SSL

**URL:** <https://www.ruby-forum.com/t/pop-email-with-ssl/101192>\
**Category:** Ruby\
**Created:** [February 5, 2006, 3:33am UTC](https://www.ruby-forum.com/t/pop-email-with-ssl/101192 "2006-02-05T03:33:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![markcasio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Post date:** [February 5, 2006, 3:33am UTC](https://www.ruby-forum.com/t/pop-email-with-ssl/101192/1 "2006-02-05T03:33:38Z")

</div>

Can someone point me to an example of reading email from a server  
using POP and SSL?

---

<div class="post-metadata">

**Author:** ![markcasio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Post date:** [February 5, 2006, 4:03am UTC](https://www.ruby-forum.com/t/pop-email-with-ssl/101192/2 "2006-02-05T04:03:44Z")

</div>

Mark V. wrote:

> Can someone point me to an example of reading email from a server  
> using POP and SSL?

I _think_ the ruby gmail library (see rubyforge, if it’s up) does this.

* * *

James B.

“The greatest obstacle to discovery is not ignorance, but the illusion  
of knowledge.”

- D. Boorstin

---

<div class="post-metadata">

**Author:** ![markcasio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Post date:** [February 5, 2006, 7:10am UTC](https://www.ruby-forum.com/t/pop-email-with-ssl/101192/3 "2006-02-05T07:10:41Z")

</div>

On 2/4/06, James B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> “The greatest obstacle to discovery is not ignorance, but the illusion  
> of knowledge.”
> 
> - D. Boorstin

I believe that the gmail lib uses net/https for doing its work. I don’t  
think 1.8.x pop3 lib can do SSL (without you manually setting up the  
socket)  
but the pop3 lib from CVS can. If you work at it, you can pull that  
into  
1.8.4 and use it by renaming some things.

-Scott

---

<div class="post-metadata">

**Author:** ![markcasio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Post date:** [February 5, 2006, 12:21pm UTC](https://www.ruby-forum.com/t/pop-email-with-ssl/101192/4 "2006-02-05T12:21:51Z")

</div>

On 2/5/06, Scott B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1.8.4 and use it by renaming some things.  
> I was trying to do a similar thing a while back, and found someone  
> who’d already had the same problem and solved it for me.

[http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/137792](http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/137792)

Page down to the end to see the pop3s bit.

Sam

---

<div class="post-metadata">

**Author:** ![markcasio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9bcb4/32.png) [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Post date:** [February 17, 2009, 7:06am UTC](https://www.ruby-forum.com/t/pop-email-with-ssl/101192/5 "2009-02-17T07:06:02Z")

</div>

Hello,

I want to get my inbox messages from my account.i tried wit pop.i  
can’t get my inbox messages.i got “undefined method `enable\_ssl’ for  
Net::POP3:Class (NoMethodError)” error.my code is

Net::POP3.enable\_ssl(OpenSSL::SSL::VERIFY\_NONE)  
conn = Net::POP3.new(‘[pop.gmail.com](http://pop.gmail.com)’,110)  
conn.start(‘removed\_email\_address@domain.invalid’,‘praveena1’)

conn.mails.each do |pop|  
msg = pop.mails[0]

# Print the ‘From:’ header line

puts msg.header.split(“\r\n”).grep(/^From: /)

# Put message to $stdout (by calling \<\<)

puts “\nFull message:\n”  
msg.all($stdout)  
end
