From: Poornima Dhanasekar Date: 2009-02-20T22:07:03+09:00 Subject: Net::POP3 Hello, I am troubling wit fetching my .xls attachments from my mail.i did this with the help if IMAP.but i wan to do the same in using POP3.i got the text files with the contents and some of bar codes.but i couldn't get the original attachments from my mail.Plz help me.Thanks in advance.my code is. require 'rubygems' require 'net/pop' Net::POP3.enable_ssl(OpenSSL::SSL::VERIFY_NONE) pop = Net::POP3.new('pop.gmail.com', Net::POP3.default_pop3s_port, false) pop.start('poornima.dgl@gmail.com', 'password') if pop.mails.empty? puts 'No mail.' else i = 0 pop.each_mail do |m| File.open("inbox/#{i}", 'w') do |f| f.write m.pop end i += 1 end puts "#{pop.mails.size} mails popped." end pop.finish -- Posted via http://www.ruby-forum.com/.