Disposable Email Domains

0.0.169 · active · verified Fri Apr 10

The `disposable-email-domains` Python library provides a collection of known disposable and temporary email address domains. It's designed to help applications identify and block registrations or interactions from email addresses often used for spam, abuse, or privacy-conscious temporary sign-ups. The list is periodically updated, with the current version being 0.0.169, reflecting changes from the primary `disposable-email-domains` project. [1, 4]

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import the `blocklist` set and check if a given email address's domain is present within it. It's crucial to convert the domain to lowercase for an accurate check, as all domains in the `blocklist` are lowercase. [4]

from disposable_email_domains import blocklist

def is_disposable_email(email_address):
    domain = email_address.split('@')[-1].lower()
    return domain in blocklist

# Example usage:
email1 = "test@mailinator.com"
email2 = "user@example.com"

print(f"Is '{email1}' from a disposable domain? {is_disposable_email(email1)}")
print(f"Is '{email2}' from a disposable domain? {is_disposable_email(email2)}")

view raw JSON →