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 documentation-tool debugger debugging-tool activerecord strscan parser-generator
Last synced: about 18 hours ago
JSON representation
Repository metadata
Ruby client api for Internet Message Access Protocol
- Host: GitHub
- URL: https://github.com/ruby/net-imap
- Owner: ruby
- License: other
- Created: 2020-02-13T07:27:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2026-04-23T20:13:06.000Z (7 days ago)
- Last Synced: 2026-04-24T00:29:33.794Z (7 days ago)
- Topics: hacktoberfest, ruby
- Language: Ruby
- Homepage: https://ruby.github.io/net-imap
- Size: 2.45 MB
- Stars: 102
- Watchers: 34
- Forks: 41
- Open Issues: 55
- Releases: 66
-
Metadata Files:
- Readme: README.md
- License: COPYING
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
imap = Net::IMAP.new('mail.example.com', ssl: true)
imap.port => 993
imap.tls_verified? => true
case imap.greeting.name
in /OK/i
# The client is connected in the "Not Authenticated" state.
imap.authenticate("PLAIN", "joe_user", "joes_password")
in /PREAUTH/i
# The client is connected in the "Authenticated" state.
end
List sender and subject of all recent messages in the default mailbox
imap.examine('INBOX')
imap.search(["RECENT"]).each do |message_id|
envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"]
puts "#{envelope.from[0].name}: \t#{envelope.subject}"
end
Move all messages from April 2003 from "Mail/sent-mail" to "Mail/sent-apr03"
imap.select('Mail/sent-mail')
if imap.list('Mail/', 'sent-apr03').empty?
imap.create('Mail/sent-apr03')
end
imap.search(["BEFORE", "30-Apr-2003", "SINCE", "1-Apr-2003"]).each do |message_id|
if imap.capable?(:move) || imap.capable?(:IMAP4rev2)
imap.move(message_id, "Mail/sent-apr03")
else
imap.copy(message_id, "Mail/sent-apr03")
imap.store(message_id, "+FLAGS", [:Deleted])
imap.expunge
end
end
Development
After checking out the repo, run bin/setup to install dependencies. Then, run bundle exec rake 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
- Name: The Ruby Programming Language
- Login: ruby
- Email: info@ruby-lang.org
- Kind: organization
- Description: Repositories related to the Ruby Programming language
- Website: https://www.ruby-lang.org/
- Location: Matsue, Japan
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/210414?v=4
- Repositories: 171
- Last ynced at: 2023-04-09T03:40:20.875Z
- Profile URL: https://github.com/ruby
GitHub Events
Total
- Release event: 21
- Delete event: 193
- Pull request event: 333
- Fork event: 6
- Discussion event: 4
- Issues event: 26
- Watch event: 27
- Issue comment event: 97
- Push event: 506
- Pull request review event: 37
- Pull request review comment event: 21
- Create event: 209
Last Year
- Release event: 8
- Delete event: 99
- Pull request event: 142
- Fork event: 6
- Discussion event: 4
- Issues event: 11
- Watch event: 8
- Issue comment event: 60
- Push event: 258
- Pull request review event: 19
- Pull request review comment event: 12
- Create event: 101
Committers metadata
Last synced: 2 days ago
Total Commits: 1,139
Total Committers: 47
Avg Commits per committer: 24.234
Development Distribution Score (DDS): 0.322
Commits in past year: 269
Committers in past year: 9
Avg Commits per committer in past year: 29.889
Development Distribution Score (DDS) in past year: 0.112
| Name | Commits | |
|---|---|---|
| nicholas a. evans | n****k@r****v | 772 |
| Shugo Maeda | s****o@r****g | 129 |
| dependabot[bot] | 4****] | 50 |
| Hiroshi SHIBATA | h****t@r****g | 42 |
| Nobuyoshi Nakada | n****u@r****g | 26 |
| 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 |
| taku0 | m****b@t****g | 2 |
| and 17 more... | ||
Committer domains:
- ruby-lang.org: 4
- sorah.jp: 1
- atg.auto: 1
- alphalink.fr: 1
- tatapa.org: 1
- redhat.com: 1
- jeremyevans.net: 1
- screenisland.com: 1
- zendesk.com: 1
- gulbrandsen.priv.no: 1
- mbf.nifty.com: 1
- rubinick.dev: 1
Issue and Pull Request metadata
Last synced: 6 days ago
Total issues: 98
Total pull requests: 603
Average time to close issues: 8 months
Average time to close pull requests: 13 days
Total issue authors: 30
Total pull request authors: 21
Average comments per issue: 1.74
Average comments per pull request: 0.41
Merged pull request: 535
Bot issues: 1
Bot pull requests: 54
Past year issues: 15
Past year pull requests: 156
Past year average time to close issues: 21 days
Past year average time to close pull requests: 2 days
Past year issue authors: 10
Past year pull request authors: 9
Past year average comments per issue: 3.13
Past year average comments per pull request: 0.32
Past year merged pull request: 130
Past year bot issues: 0
Past year bot pull requests: 18
Top Issue Authors
- nevans (65)
- 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)
- shugo (1)
Top Pull Request Authors
- nevans (505)
- dependabot[bot] (54)
- hsbt (13)
- taku0 (4)
- shugo (4)
- nobu (3)
- avdi (2)
- sorah (2)
- arnt (2)
- gaynetdinov (2)
- eregon (2)
- ko1 (1)
- Masamuneee (1)
- thesmartshadow (1)
- idahomst (1)
Top Issue Labels
- IMAP4rev2 (23)
- SASL :lock: (11)
- IMAP4rev1 (8)
- bug (4)
- help wanted (2)
- enhancement (1)
- dependencies (1)
- jruby (1)
- performance (1)
- backport (1)
Top Pull Request Labels
- enhancement (66)
- dependencies (61)
- bug (60)
- documentation (60)
- backport (52)
- SASL :lock: (39)
- tests-only (39)
- github_actions (21)
- IMAP4rev2 (18)
- security vulnerability patch (16)
- IMAP4rev1 (11)
- backport-0.5 (9)
- breaking-change (9)
- backport-0.4 (8)
- performance (7)
- v0.5 (1)
Package metadata
- Total packages: 22
-
Total downloads:
- rubygems: 638,750,347 total
- Total docker downloads: 6,625,985,594
- Total dependent packages: 22 (may contain duplicates)
- Total dependent repositories: 33,570 (may contain duplicates)
- Total versions: 247
- Total maintainers: 5
- Total advisories: 4
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 about 2 months ago)
- Last Synced: 2026-04-27T16:18:35.003Z (3 days 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
- Homepage: https://github.com/ruby/net-imap
- Documentation: http://www.rubydoc.info/gems/net-imap/
- Licenses: Ruby,BSD-2-Clause
- Latest release: 0.6.4 (published 7 days ago)
- Last Synced: 2026-04-29T00:12:11.696Z (1 day ago)
- Versions: 66
- Dependent Packages: 22
- Dependent Repositories: 33,570
- Downloads: 319,840,546 Total
- Docker Downloads: 3,312,992,797
-
Rankings:
- Docker downloads count: 0.031%
- Dependent repos count: 0.182%
- Downloads: 0.221%
- Dependent packages count: 1.094%
- Average: 2.534%
- Forks count: 5.39%
- Stargazers count: 8.287%
- Maintainers (4)
- Advisories:
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.4 (published 7 days ago)
- Last Synced: 2026-04-28T21:02:50.590Z (2 days ago)
- Versions: 64
- 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-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 about 2 years ago)
- Last Synced: 2026-03-07T07:49:22.530Z (about 2 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
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 about 2 years ago)
- Last Synced: 2026-04-08T01:05:08.989Z (23 days 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-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 about 2 years ago)
- Last Synced: 2026-04-08T01:05:16.668Z (23 days 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
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 about 2 years ago)
- Last Synced: 2026-04-08T01:05:16.716Z (23 days 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
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 12 months ago)
- Last Synced: 2026-03-06T06:42:55.362Z (about 2 months ago)
- Versions: 8
- 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-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 12 months ago)
- Last Synced: 2026-04-08T00:01:56.220Z (23 days ago)
- Versions: 8
- 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 about 2 years ago)
- Last Synced: 2026-04-03T06:26:36.824Z (27 days 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 about 2 years ago)
- Last Synced: 2026-04-08T01:07:56.862Z (23 days 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.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 12 months ago)
- Last Synced: 2026-04-14T03:04:35.304Z (17 days 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-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 12 months ago)
- Last Synced: 2026-04-08T01:05:23.707Z (23 days 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.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 5 months ago)
- Last Synced: 2026-04-08T01:05:23.660Z (23 days 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 5 months ago)
- Last Synced: 2026-04-08T01:05:18.349Z (23 days 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.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 about 1 year ago)
- Last Synced: 2026-04-15T17:04:22.613Z (15 days 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 5 months ago)
- Last Synced: 2026-04-15T17:04:20.241Z (15 days 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.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 12 months ago)
- Last Synced: 2026-04-14T15:03:09.272Z (16 days 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 12 months ago)
- Last Synced: 2026-04-08T01:05:23.606Z (23 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
gem.coop: net-imap
Ruby client api for Internet Message Access Protocol
- Homepage: https://github.com/ruby/net-imap
- Documentation: http://www.rubydoc.info/gems/net-imap/
- Licenses: Ruby,BSD-2-Clause
- Latest release: 0.6.4 (published 7 days ago)
- Last Synced: 2026-04-26T20:01:23.902Z (4 days ago)
- Versions: 66
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 318,909,801 Total
- Docker Downloads: 3,312,992,797
-
Rankings:
- Downloads: 0.0%
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (4)
- Advisories:
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 about 1 year ago)
- Last Synced: 2026-03-20T09:08:41.870Z (about 1 month 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
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 5 months ago)
- Last Synced: 2026-04-08T01:05:25.704Z (23 days ago)
- Versions: 3
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
- Maintainers (1)
Dependencies
- actions/checkout v3 composite
- ruby/setup-ruby v1 composite
- rake >= 0
- rdoc >= 0
- test-unit >= 0
- digest >= 0 development
- strscan >= 0 development
- date >= 0
- net-protocol >= 0
- 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
- actions/checkout v5 composite
- ruby/setup-ruby v1 composite
- rubygems/release-gem v1 composite
- step-security/harden-runner 95d9a5deda9de15063e7595e9719c11c38c90ae2 composite
Score: 31.61269628658128