Project

freemail

0.05
Low commit activity in last 3 years
No release in over a year
A ruby implementation of the npm 'freemail' module, providing a database of free and disposable email domains.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0
>= 0
 Project Readme

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?('howard@gmail.com')
# true
Freemail.free?('george@mailinater.com')
# false
Freemail.disposable?('howard@gmail.com')
# false
Freemail.disposable?('george@mailinater.com')
# true

API for custom domains

require 'freemail'

email = 'example@superlocalfreeemail.com'

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.