https://github.com/oshanz/disposable-email
Prevent fake signups and spam: Elixir library for detecting disposable and temporary emails, using an up-to-date blocklist of over 5,000 domains.
https://github.com/oshanz/disposable-email
disposable disposable-email-domains disposable-emails
Last synced: 2 months ago
JSON representation
Prevent fake signups and spam: Elixir library for detecting disposable and temporary emails, using an up-to-date blocklist of over 5,000 domains.
- Host: GitHub
- URL: https://github.com/oshanz/disposable-email
- Owner: oshanz
- License: apache-2.0
- Created: 2025-12-08T12:09:45.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-04-19T00:11:18.000Z (3 months ago)
- Last Synced: 2026-04-19T02:30:21.314Z (3 months ago)
- Topics: disposable, disposable-email-domains, disposable-emails
- Language: Elixir
- Homepage: https://hex.pm/packages/disposable_email
- Size: 76.2 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
- [x] Handles subdomain matching (e.g., `user@sub.domain.com`)
- [x] Fast in-memory lookup using ETS tables
- [x] Supports scheduled downloads of the latest blocklist from [github.com/disposable-email-domains](https://github.com/disposable-email-domains/disposable-email-domains)
```elixir
## 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`:
```elixir
def deps do
[
{:disposable_email, "~> 0.5"}
]
end
```
## Usage
```elixir
# Check if an email is from a disposable domain
DisposableEmail.disposable?("user@tempmail.com")
# => true
DisposableEmail.disposable?("user@gmail.com")
# => false
```