search for: each_mail

Displaying 2 results from an estimated 2 matches for "each_mail".

Did you mean: ch_mail
2006 Jul 05
1
TMail + Receing mail and extract attachments
...l, I always get the following error... My code: << pop = Net::POP3.new(''pop.mydomain.com'') pop.start(''xxx'', ''xxxxx'') # (1) if pop.mails.empty? puts ''No mail.'' else i = 0 pop.each_mail do |m| # or "pop.mails.each ..." # (2) File.open("inbox/#{i}", ''w+'') do |f| f.write m.pop Mailman.receive(m.pop) end #m.delete i += 1 end puts "#{pop.mails.size} mails popped." end p...
2006 Jun 16
0
Polling pop3 and adding emails to ticket system
...#39;, :id => params[:id], :comment=> @comment end def poll_pop3 require ''net/pop'' pop = Net::POP3.new(''mail'') pop.start(''me@company'', ''password'') # (1) if pop.mails.empty? else i = 0 pop.each_mail do |m| # or "pop.mails.each ..." # (2) IncomingMail.receive(m.pop) i += 1 end end pop.finish end end -- Posted via http://www.ruby-forum.com/.