A summary of data about the Ruby ecosystem.

https://github.com/ruby/net-imap

Ruby client api for Internet Message Access Protocol
https://github.com/ruby/net-imap

Keywords

hacktoberfest ruby

Keywords from Contributors

repl webrick rubygems bigdecimal debugger debugging-tool documentation-tool lalr-parser-generator parser-generator strscan

Last synced: about 15 hours ago
JSON representation

Repository metadata

Ruby client api for Internet Message Access Protocol

README.md

Net::IMAP

Net::IMAP implements Internet Message Access Protocol (IMAP) client
functionality. The protocol is described in
RFC3501,
RFC9051 and various extensions.

Installation

Add this line to your application's Gemfile:

gem 'net-imap'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install net-imap

Usage

Connect with TLS to port 993

hostname = "mail.example.com"
username = "user@example.com"
password = "correct-horse-battery-staple"

imap = Net::IMAP.new(hostname, ssl: true)
imap.authenticate(:plain, username, password)

To authenticate with an OAuth2 access token:

if imap.auth_capable?(:OAUTHBEARER)
  imap.authenticate(:OAUTHBEARER, username, oauth2_token)
elsif imap.auth_capable?(:XOAUTH2)
  imap.authenticate(:XOAUTH2, username, oauth2_token)
else
  raise "OAuth2 not supported?"
end

List sender and subject of recent messages

imap.examine('INBOX')
search_result = imap.uid_search(["SINCE", Date.today - 7])
imap.uid_fetch(search_result, "ENVELOPE").each do |fetch_data|
  envelope = fetch_data.envelope
  puts "#{envelope.from.first.name}: \t#{envelope.subject}"
end

Move messages between two dates to another mailbox

source      = "Mail/sent-mail"
destination = "Mail/sent-apr03"

# The "BEFORE" and "AFTER" search criteria are not inclusive.
since  = Date.parse("2003-04-01").prev_day
before = Date.parse("2003-05-01")

if imap.list("", destination).empty?
  imap.create(destination)
end
imap.select(source)
search_result = imap.uid_search(["SINCE", since, "BEFORE", before])
if imap.capable?(:MOVE) || imap.capable?(:IMAP4rev2)
  imap.uid_move(search_result, destination)
else
  # Atomic MOVE is not supported.  Copy, delete, and expunge.
  imap.uid_copy(search_result, destination)
  imap.uid_store(search_result, "+FLAGS", [:Deleted])
  if imap.capable?(:UIDPLUS) || imap.capable?(:IMAP4rev2)
    imap.uid_expunge(search_result)
  else
    # NOTE: This may expunge _other_ deleted messages, too.
    imap.expunge
  end
end

Development

After checking out the repo, run bin/setup to install dependencies. Then, run
bin/test to run the tests. You can also run bin/console for an interactive
prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To
release a new version, update the version number in version.rb, and then run
bundle exec rake release, which will create a git tag for the version, push
git commits and tags, and push the .gem file to
rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/net-imap.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: about 16 hours ago

Total Commits: 1,276
Total Committers: 49
Avg Commits per committer: 26.041
Development Distribution Score (DDS): 0.317

Commits in past year: 312
Committers in past year: 10
Avg Commits per committer in past year: 31.2
Development Distribution Score (DDS) in past year: 0.186

Name Email Commits
nick evans n****k@r****v 872
shugo s****o@b****e 129
dependabot[bot] 4****] 57
Hiroshi SHIBATA h****t@r****g 43
nobu n****u@b****e 30
Oskar Eichler o****r@s****m 24
Kazuhiro NISHIYAMA zn@m****m 12
matz m****z@b****e 8
akr a****r@b****e 7
Stefan Hoffmann s****3@g****m 6
Avdi Grimm a****i 5
shyouhei s****i@b****e 5
knu k****u@b****e 5
Arnt Gulbrandsen a****t@g****o 5
normal n****l@b****e 4
Yusuke Endoh m****e@r****g 4
naruse n****e@b****e 4
gsinclair g****r@b****e 4
Damir Gainetdinov d****v@z****m 3
Sarah Sunday 3****y 3
drbrain d****n@b****e 3
usa u****a@b****e 3
Benoit Daloze e****p@g****m 3
ko1 k****1@b****e 3
Bijan Rahnema b****n@s****m 2
Jeremy Evans c****e@j****t 2
Masamune 1****e 2
Vít Ondruch v****h@r****m 2
marcandre m****e@b****e 2
svn s****n@b****e 2
and 19 more...

Committer domains:


Issue and Pull Request metadata

Last synced: about 23 hours ago

Total issues: 107
Total pull requests: 690
Average time to close issues: 6 months
Average time to close pull requests: 12 days
Total issue authors: 32
Total pull request authors: 26
Average comments per issue: 1.78
Average comments per pull request: 0.44
Merged pull request: 611
Bot issues: 1
Bot pull requests: 62

Past year issues: 16
Past year pull requests: 144
Past year average time to close issues: 13 days
Past year average time to close pull requests: 2 days
Past year issue authors: 8
Past year pull request authors: 12
Past year average comments per issue: 1.69
Past year average comments per pull request: 0.56
Past year merged pull request: 123
Past year bot issues: 0
Past year bot pull requests: 18

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/ruby/net-imap

Top Issue Authors

  • nevans (65)
  • OskarEichler (8)
  • stanley90 (2)
  • Neustradamus (2)
  • hoffi (2)
  • hsbt (2)
  • rhenium (1)
  • xiaoge1001 (1)
  • sos4nt (1)
  • dependabot[bot] (1)
  • joelmoss (1)
  • Eguthrie3214 (1)
  • voxik (1)
  • denzelem (1)
  • limmet (1)

Top Pull Request Authors

  • nevans (563)
  • dependabot[bot] (62)
  • hsbt (15)
  • OskarEichler (12)
  • nobu (6)
  • shugo (4)
  • taku0 (4)
  • eregon (2)
  • gaynetdinov (2)
  • arnt (2)
  • sorah (2)
  • avdi (2)
  • Masamuneee (1)
  • thesmartshadow (1)
  • ko1 (1)

Top Issue Labels

  • IMAP4rev2 (23)
  • SASL :lock: (15)
  • IMAP4rev1 (8)
  • bug (4)
  • help wanted (2)
  • performance (2)
  • enhancement (1)
  • dependencies (1)
  • jruby (1)
  • backport (1)

Top Pull Request Labels

  • bug (91)
  • enhancement (76)
  • dependencies (69)
  • documentation (66)
  • backport (57)
  • tests-only (52)
  • SASL :lock: (39)
  • github_actions (29)
  • security vulnerability patch (22)
  • IMAP4rev2 (18)
  • backport-0.5 (14)
  • IMAP4rev1 (12)
  • breaking-change (9)
  • performance (8)
  • backport-0.4 (8)
  • v0.5 (1)

Package metadata

guix: ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Documentation: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby-xyz.scm#n4392
  • Licenses: bsd-2
  • Latest release: 0.3.4 (published 7 months ago)
  • Last Synced: 2026-04-27T16:18:35.003Z (5 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.376%
    • Forks count: 0.714%
    • Stargazers count: 0.791%
rubygems.org: net-imap

Ruby client api for Internet Message Access Protocol

proxy.golang.org: github.com/ruby/net-imap

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/ruby/net-imap#section-documentation
  • Licenses: other
  • Latest release: v0.6.7 (published 23 days ago)
  • Last Synced: 2026-10-04T02:31:18.903Z (1 day ago)
  • Versions: 69
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Forks count: 4.774%
    • Stargazers count: 6.595%
    • Average: 7.937%
    • Dependent packages count: 9.576%
    • Dependent repos count: 10.802%
alpine-v3.18: ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.3.4.1-r0 (published over 2 years ago)
  • Last Synced: 2026-04-08T01:05:08.989Z (6 months ago)
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 11.476%
    • Forks count: 21.565%
    • Stargazers count: 24.338%
  • Maintainers (1)
alpine-v3.18: ruby-net-imap-doc

Ruby client api for Internet Message Access Protocol (ri docs)

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.3.4.1-r0 (published over 2 years ago)
  • Last Synced: 2026-03-07T07:49:22.530Z (7 months ago)
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 11.476%
    • Forks count: 21.565%
    • Stargazers count: 24.338%
  • Maintainers (1)
alpine-v3.16: ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.2.4-r0 (published over 2 years ago)
  • Last Synced: 2026-09-04T14:27:21.101Z (about 1 month ago)
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Average: 15.537%
    • Forks count: 16.306%
    • Stargazers count: 18.53%
    • Dependent packages count: 27.311%
  • Maintainers (1)
alpine-v3.16: ruby-net-imap-doc

Ruby client api for Internet Message Access Protocol (ri docs)

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.2.4-r0 (published over 2 years ago)
  • Last Synced: 2026-04-08T01:05:16.668Z (6 months ago)
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Average: 15.537%
    • Forks count: 16.306%
    • Stargazers count: 18.53%
    • Dependent packages count: 27.311%
  • Maintainers (1)
alpine-edge: ruby-net-imap-doc

Ruby client api for Internet Message Access Protocol (ri docs)

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.5.15-r0 (published 2 months ago)
  • Last Synced: 2026-08-02T10:32:11.081Z (2 months ago)
  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 14.641%
    • Average: 15.775%
    • Forks count: 22.441%
    • Stargazers count: 26.018%
  • Maintainers (1)
alpine-edge: ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.5.15-r0 (published 2 months ago)
  • Last Synced: 2026-08-02T10:32:10.897Z (2 months ago)
  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 14.641%
    • Average: 15.775%
    • Forks count: 22.441%
    • Stargazers count: 26.018%
  • Maintainers (1)
alpine-v3.17: ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.2.4-r0 (published over 2 years ago)
  • Last Synced: 2026-04-03T06:26:36.824Z (6 months ago)
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Average: 17.185%
    • Forks count: 19.395%
    • Stargazers count: 22.089%
    • Dependent packages count: 27.254%
  • Maintainers (1)
alpine-v3.17: ruby-net-imap-doc

Ruby client api for Internet Message Access Protocol (ri docs)

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.2.4-r0 (published over 2 years ago)
  • Last Synced: 2026-04-08T01:07:56.862Z (6 months ago)
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Average: 17.185%
    • Forks count: 19.395%
    • Stargazers count: 22.089%
    • Dependent packages count: 27.254%
  • Maintainers (1)
alpine-v3.19: ruby-net-imap-doc

Ruby client api for Internet Message Access Protocol (ri docs)

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.3.9-r0 (published over 1 year ago)
  • Last Synced: 2026-03-20T09:08:41.870Z (7 months ago)
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.21: ruby-net-imap-doc

Ruby client api for Internet Message Access Protocol (ri docs)

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.22-r0 (published 11 months ago)
  • Last Synced: 2026-04-08T01:05:18.349Z (6 months ago)
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.22: ruby-net-imap-doc

Ruby client api for Internet Message Access Protocol (ri docs)

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.5.8-r0 (published over 1 year ago)
  • Last Synced: 2026-04-08T01:05:23.707Z (6 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.19: ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.3.9-r0 (published over 1 year ago)
  • Last Synced: 2026-04-15T17:04:22.613Z (6 months ago)
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.21: ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.22-r0 (published 11 months ago)
  • Last Synced: 2026-04-08T01:05:23.660Z (6 months ago)
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
pkgsrc-netbsd-x86_64-10.1-all: net/ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Documentation: https://pkgsrc.se/net/ruby-net-imap
  • Licenses: 2-clause-bsd OR ruby-license
  • Latest release: 0.5.13 (published 6 months ago)
  • Last Synced: 2026-05-27T08:44:38.307Z (4 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
alpine-v3.23: ruby-net-imap-doc

Ruby client api for Internet Message Access Protocol (ri docs)

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.5.8-r0 (published over 1 year ago)
  • Last Synced: 2026-04-14T03:04:35.304Z (6 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.23: ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.5.8-r0 (published over 1 year ago)
  • Last Synced: 2026-04-14T15:03:09.272Z (6 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.22: ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.5.8-r0 (published over 1 year ago)
  • Last Synced: 2026-04-08T01:05:23.606Z (6 months ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.20: ruby-net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.22-r0 (published 11 months ago)
  • Last Synced: 2026-04-08T01:05:25.704Z (6 months ago)
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
alpine-v3.20: ruby-net-imap-doc

Ruby client api for Internet Message Access Protocol (ri docs)

  • Homepage: https://github.com/ruby/net-imap
  • Licenses: BSD-2-Clause AND Ruby
  • Latest release: 0.4.22-r0 (published 11 months ago)
  • Last Synced: 2026-04-15T17:04:20.241Z (6 months ago)
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
  • Maintainers (1)
gentoo-portage: dev-ruby/net-imap

Ruby client api for Internet Message Access Protocol

  • Homepage: https://github.com/ruby/net-imap
  • Documentation: https://packages.gentoo.org/packages/dev-ruby/net-imap
  • Licenses: BSD-2
  • Latest release: 0.6.2 (published 6 months ago)
  • Last Synced: 2026-08-24T13:26:08.662Z (about 1 month ago)
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%

Dependencies

.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • ruby/setup-ruby v1 composite
Gemfile rubygems
  • rake >= 0
  • rdoc >= 0
  • test-unit >= 0
net-imap.gemspec rubygems
  • digest >= 0 development
  • strscan >= 0 development
  • date >= 0
  • net-protocol >= 0
.github/workflows/pages.yml actions
  • actions/checkout v5 composite
  • actions/configure-pages v5 composite
  • actions/deploy-pages v4 composite
  • actions/upload-pages-artifact v4 composite
  • ruby/setup-ruby v1 composite
.github/workflows/push_gem.yml actions
  • actions/checkout v5 composite
  • ruby/setup-ruby v1 composite
  • rubygems/release-gem v1 composite
  • step-security/harden-runner 95d9a5deda9de15063e7595e9719c11c38c90ae2 composite

Score: 31.775153712414074