I was looking for some good way to parse mails with rails 3.2.
I did not want to setup external server as R. Bates show in episode: http://railscasts.com/episodes/313-receiving-email-with-mailman
I found simple solution:
Mail.defaults do
retriever_method :pop3, :address => "pop.gmail.com",
:port => 995,
:user_name => '*****@gmail.com',
:password => '*****',
:enable_ssl => true
end
Mail.all.each do |email|
some_email_parser(email)
end
It is fired up as rake task invoked by Cron every 15min.
If you see any disadvantages of that approach let me know.
This code works fine so I leave it like this.