/mail-notify

Notify your unread emails fetched from IMAP servers.

Primary LanguageRuby

Mail notify

Notify your unread emails fetched from IMAP servers.

Requirement

  • Ruby 1.9.3
  • Ubuntu 12.04
  • Target mail service that allows you to access via IMAP (e.g. Gmail)

Install

Install Ruby 1.9.3

See http://www.ruby-lang.org/.

Install notify-send command

$ sudo apt-get install notify-osd libnotify-bin

Usage

Edit config file

Edit config.yml to set IMAP server, email, password and interval time to fetch emails.

server: [IMAP server]
email: [Email address]
password: [Password]
interval: [Fetch interval time (seconds)]

Example for using Gmail:

server: imap.gmail.com
email: your-email@gmail.com
password: your_password
interval: 300

Run the script

$ ruby mail-notify

Stop the script

mail-notify works as a daemon.

To kill the process, check the PID and kill it.

$ pgrep -fl mail-notify
16500 ruby ./mail-notify
$ kill -KILL 16500

Or shortly,

$ pkill -f mail-notify

License

This project is released under the MIT license:

http://opensource.org/licenses/MIT