Displaying 1 result from an estimated 1 matches for "poll_pop3".
2006 Jun 16
0
Polling pop3 and adding emails to ticket system
...nd(params[:id]).destroy
redirect_to :action => ''list''
end
def add_comment
@comment =
Ticket.find(params[:id]).comments.create(params[:comment])
redirect_to :action => ''show'', :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...