DisposableEmail

Prevent fake signups and spam: Elixir library for detecting disposable and temporary emails, using an up-to-date blocklist of over 5,000 domains.

Features

## https://hexdocs.pm/quantum/Quantum.html
config :my_app, MyApp.Scheduler,
  jobs: [
    {"@daily", {DisposableEmail, :reload, []}},
  ]

If blocklist download fails, an error is logged, but the app continues running using the most recent available blocklist (bundled at startup or last successful download).

Installation

Add disposable_email to your list of dependencies in mix.exs:

def deps do
  [
    {:disposable_email, "~> 0.5"}
  ]
end

Usage

# Check if an email is from a disposable domain
DisposableEmail.disposable?("user@tempmail.com")
# => true

DisposableEmail.disposable?("user@gmail.com")
# => false