No commit activity in last 3 years
No release in over 3 years
A utility in ruby to read the emails from pop3 as array of hashes and delete emails with specified email unique ids
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.2.3.1
 Project Readme
Author
====
Niranjan Sarade

About the utility - EmailPopReader
====
POP3 (Post Office Protocol) is the standard client/server protocol to receive emails.
In ruby, we have a libray called Net::POP3 which provides functionality for retrieving 
email via POP3. In that, you basically start the pop session for accessing the emails
and close the pop session at the end.

TMail library has a complete way to handle and manipulate emails from within ruby code.
It allows you to treat an email totally as an object.

There can be a business requirement for scanning emails from mail-in database and storing those in some sort of data structure to process further.
This utility makes use of Net::POP3 and TMail libraries and provides with some handy methods such as 'retrieve emails' as array of hashes.
The hash has email's from,to,cc,bcc,subject,body fields. Email body with attachment has not been considered for simplicity.

It also provides 'delete_emails(unique_email_ids=[])' method which takes array of unique email ids (retrieved with pop email unique_id) as parameter and deletes those.

This gem has a TMail gem dependency.

Example
====

You can set the following three valiables in either environment.rb file in RAILS application or as global constants.
POP_HOST
POP_USERNAME
POP_PASSWORD

pop_reader = EmailPopReader.new
emails = pop_reader.retrieve_emails
pop_reader.delete_emails <array of email unique ids to be deleted>

Install
====
gem install email_pop_reader

(It has been pushed to http://gemcutter.org)

OR

Download the gem file from http://github.com/NiranjanSarade/email-pop-reader.git/
gem install email_pop_reader-0.0.1.gem

Uninstall
====
gem uninstall email_pop_reader