POP email with SSL

M

Mark Volkmann

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

James Britt

Mark said:
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
 
S

Scott Barron

------=_Part_15214_27460482.1139119813177
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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
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

------=_Part_15214_27460482.1139119813177--
 
S

Sam Gentle

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 sock= et)
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.

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

Page down to the end to see the pop3s bit.

Sam
 
P

Poornima Dhanasekar

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('(e-mail address removed)','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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,183
Messages
2,570,964
Members
47,511
Latest member
svareza

Latest Threads

Top