You can easily search mail to satisfy conditions.
Add this line to your application's Gemfile:
gem 'search_mbox'
And then execute:
$ bundle
Or install it yourself as:
$ gem install search_mbox
host="example.com"
account="hoge@example.com"
passwd="hoge1234"
SearchMbox.login(host, account, passwd)
mails = SearchMbox.search()
puts mails
host="example.com"
account="hoge@example.com"
passwd="hoge1234"
SearchMbox.login(host, account, passwd)
mails = SearchMbox.search(["From", "hoge@example.com"])
puts mails
- Fork it ( https://github.com/[my-github-username]/search_mbox/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request