[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

email problem

Poornima Dhanasekar

2/19/2009 4:49:00 AM

Hi,
I am trobling wit an email problem for getting my messages.I have
to retrieve my attachements from my inbox messages.i dint' get a
solution yet.can you plz give me a solution to me.I got "Running Mail
Importer...
execution expired
Finished Mail Importer " error.


my code is

require "rubygems"
require 'net/pop'

def index

puts "Running Mail Importer..."
begin
if Net::POP3.start("pop.gmail.com", nil, "poornima.dgl@gmail.com",
"password")
Net::POP3.start("pop.gmail.com", nil, "poornima.dgl@gmail.com",
"password") do |pop|
puts "After....."
if pop.mails.empty?
puts "NO MAIL"
else
pop.mails.each do |email|
begin
puts "receiving mail..."
Notifier.receive(email.pop)
email.delete
rescue Exception => e
puts "Error receiving email at " + Time.now.to_s + "::: " +
e.message
end
end
end
end
else
puts "Not Connecting..."
end
rescue Exception => e
puts e
end

puts "Finished Mail Importer."

end
--
Posted via http://www.ruby-....