Forum: Ruby POP email with SSL

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
52a177e9dbd3e614825aabc4e45f8cd6?d=identicon&s=25 Mark Volkmann (Guest)
on 2006-02-05 03:33
(Received via mailing list)
Can someone point me to an example of reading email from a server
using POP and SSL?
Bc6d88907ce09158581fbb9b469a35a3?d=identicon&s=25 James Britt (Guest)
on 2006-02-05 04:03
(Received via mailing list)
Mark Volkmann 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 Britt

"The greatest obstacle to discovery is not ignorance, but the illusion
of knowledge."
  - D. Boorstin
61d446522cd03aa337029d5fdb4ad1d1?d=identicon&s=25 Scott Barron (Guest)
on 2006-02-05 07:10
(Received via mailing list)
On 2/4/06, James Britt <james_b@neurogami.com> 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
91ac0ea6ae5c8cd67e2ed455b43ffbee?d=identicon&s=25 Sam Gentle (Guest)
on 2006-02-05 12:21
(Received via mailing list)
On 2/5/06, Scott Barron <linguist@gmail.com> 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...

Page down to the end to see the pop3s bit.

Sam
6ea6d870dca01610bf455951220db3ac?d=identicon&s=25 Poornima Dhanasekar (poornimad)
on 2009-02-17 07:06
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',110)
conn.start('poornima.dgl@gmail.com','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
This topic is locked and can not be replied to.