Go to file
Yaroslav Sidlovsky 1915577937 using test server for spec 2018-09-11 12:18:24 +03:00
spec using test server for spec 2018-09-11 12:18:24 +03:00
src using test server for spec 2018-09-11 12:18:24 +03:00
test using test server for spec 2018-09-11 12:18:24 +03:00
.editorconfig first commit 2017-08-29 23:00:02 +01:00
.gitignore using test server for spec 2018-09-11 12:18:24 +03:00
.travis.yml first commit 2017-08-29 23:00:02 +01:00
LICENSE first commit 2017-08-29 23:00:02 +01:00
Makefile using test server for spec 2018-09-11 12:18:24 +03:00
README.md added dovecottesting note 2017-09-07 22:26:19 +01:00
shard.yml first commit 2017-08-29 23:00:02 +01:00
test.cr ~~~ 2018-09-10 22:53:48 +03:00

README.md

imap

A very much WIP imap library for crystal.

Installation

Add this to your application's shard.yml:

dependencies:
  imap:
    github: crisward/imap

Usage

require "imap"

imap = Imap::Client.new(host: "imap.gmail.com", port: 993, username: "email@gmail.com", password: "*******")
mailboxes = imap.list
if mailboxes.size > 0
  mailbox = mailboxes[0]
  imap.select(mailbox)
  status = imap.status(mailbox, ["MESSAGES", "UNSEEN"])
  puts "There are #{status["MESSAGES"]} message in #{mailbox} #{status["UNSEEN"]} unread."
end
imap.close

Testing

Need to start writing tests.

Contributing

  1. Fork it ( https://github.com/crisward/imap/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • crisward Cris Ward - creator, maintainer