Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.
/ freemail-ruby Public archive
forked from smudge/freemail

A ruby implementation of the npm 'freemail' database of free and disposable email domains.

License

Notifications You must be signed in to change notification settings

assaydepot/freemail-ruby

 
 

Repository files navigation

Freemail Build Status Maintainability Test Coverage

A ruby implementation of the npm freemail module, which provides a database of free and disposable email domains.

All credit for free.txt and disposable.txt goes to the npm freemail maintainers.

Installation

Add this line to your application's Gemfile:

gem 'freemail', require: false

And then execute:

$ bundle

Usage

Basic usage

require 'freemail'

Freemail.free?('[email protected]')
# true
Freemail.free?('[email protected]')
# false
Freemail.disposable?('[email protected]')
# false
Freemail.disposable?('[email protected]')
# true

API for custom domains

require 'freemail'

email = '[email protected]'

Freemail.free?(email)
# false

Freemail.add_free_domains('superlocalfreeemail.com')
# or by Array
Freemail.add_free_domains(['superlocalfreeemail.com'])

Freemail.free?(email)
# true

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec 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, or specify a path option in your gemfile:

gem 'freemail', path: '../path/to/your/copy'

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/smudge/freemail.

License

The gem is available as open source under the terms of the MIT License.

About

A ruby implementation of the npm 'freemail' database of free and disposable email domains.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 96.9%
  • Shell 1.7%
  • Nix 1.4%