A GenServer-based Elixir library for detecting disposable email addresses using the disposable-email-domains blocklist.
This library periodically downloads and caches a list of known disposable email domains, allowing you to quickly check if an email address is from a temporary email service.
- Handles subdomain matching (e.g.,
[email protected]) - Fast in-memory lookup using ETS tables
- Supports scheduled downloads of the latest blocklist from github.com/disposable-email-domains
## https://hexdocs.pm/quantum/Quantum.html
config :my_app, MyApp.Scheduler,
jobs: [
{"@daily", {DisposableEmail, :reload, []}},
]Add disposable_email to your list of dependencies in mix.exs:
def deps do
[
{:disposable_email, "~> 0.4.1"}
]
end# Check if an email is from a disposable domain
DisposableEmail.disposable?("[email protected]")
# => true
DisposableEmail.disposable?("[email protected]")
# => false