No commit activity in last 3 years
No release in over 3 years
This is an extraction of a useful pattern for pulling emails and their attached files and processing them.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.17
>= 0
~> 5.0
~> 10.0
 Project Readme

EmailFetchAndProcess

This little gem encapsulates some logic distilled and extracted from a bunch of different scripts used to access a mailbox, find an email, and get the file attachment from it.

It is currently very focused and limited to that job and that job only, but with a little TLC it could become a more general email access/extract/process tool.

Installation

Add this line to your application's Gemfile:

gem 'email-fetch-and-process'

And then execute:

$ bundle

Or install it yourself as:

$ gem install email-fetch-and-process

Usage

require 'email-fetch-and-process'

jobs = []
jobs << EmailFetchAndProcess::Job.new({fetch: ['SUBJECT', 'Some subject line']})

r = EmailFetchAndProcess.new({host: 'imap.gmail.com',port: 993, id: 'YOURID', password: 'YOURPASSWORD'})
r.run(jobs)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/wyhaines/email-fetch-and-process.

License

The gem is available as open source under the terms of the MIT License.