https://github.com/mikel/mail
Ruby
A Really Ruby Mail Library
Mail::Retriever#find_and_delete
Find emails in the mailbox, and then deletes them. Without any options, the
five last received emails are returned.
Possible options:
what: last or first emails. The default is :first.
order: order of emails returned. Possible values are :asc or :desc. Default value is :asc.
count: number of emails to retrieve. The default value is 10. A value of 1 returns an
instance of Message, not an array of Message instances.
delete_after_find: flag for whether to delete each retreived email after find. Default
is true. Call #find if you would like this to default to false.Edit
git clone [email protected]:mikel/mail.git
cd mail
open lib/mail/network/retriever_methods/base.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Mail--Retriever-find_and_delete-for-pr
# Commit to gitgit add lib/mail/network/retriever_methods/base.rbgit commit -m "better docs for Mail::Retriever#find_and_delete"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Mail--Retriever-find_and_delete-for-pr
hub pull-request
# Celebrate!