{"id":2472,"library":"disposable-email-domains","title":"Disposable Email Domains","description":"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]","status":"active","version":"0.0.169","language":"python","source_language":"en","source_url":"https://github.com/disposable-email-domains/python-disposable-email-domains","tags":["email","disposable","temporary-email","validation","blocklist","spam-prevention"],"install":[{"cmd":"pip install disposable-email-domains","lang":"bash","label":"Install with pip"}],"dependencies":[],"imports":[{"symbol":"blocklist","correct":"from disposable_email_domains import blocklist"}],"quickstart":{"code":"from disposable_email_domains import blocklist\n\ndef is_disposable_email(email_address):\n    domain = email_address.split('@')[-1].lower()\n    return domain in blocklist\n\n# Example usage:\nemail1 = \"test@mailinator.com\"\nemail2 = \"user@example.com\"\n\nprint(f\"Is '{email1}' from a disposable domain? {is_disposable_email(email1)}\")\nprint(f\"Is '{email2}' from a disposable domain? {is_disposable_email(email2)}\")","lang":"python","description":"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]"},"warnings":[{"fix":"Regularly update the library to the latest version (`pip install --upgrade disposable-email-domains`). For critical applications requiring real-time accuracy, combine this library with an external email validation API that offers dynamic updates and deeper checks. [3, 10, 19]","message":"The `blocklist` is a static dataset compiled at release time. New disposable domains appear daily, and existing ones can change status. This means the list can become outdated between releases, potentially leading to false negatives (missing new disposable domains) or false positives (blocking legitimate domains that are no longer disposable). For the most up-to-date and comprehensive checks, consider integrating with a real-time email validation API service. [3, 19]","severity":"gotcha","affected_versions":"All versions"},{"fix":"For comprehensive email validation, combine the use of this `blocklist` with other validation steps, such as regex for format checking, MX record lookups, and optionally, real-time mailbox verification services. [18]","message":"This library only provides a list of disposable domains; it does not perform full email address validation. It will not check for correct email format, valid MX records, or if a mailbox actually exists. Relying solely on this list for email validation can leave your application vulnerable to malformed or non-existent email addresses from non-disposable domains. [18, 19]","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always convert the domain part of an email address to lowercase (e.g., `email_address.split('@')[-1].lower()`) before checking if it is in the `disposable_email_domains.blocklist`.","message":"Domains in the `blocklist` are guaranteed to be fully lowercased. Input domains must also be converted to lowercase before checking against the `blocklist` to ensure accurate matching. Failing to lowercase the input domain will result in an incorrect `False` for disposable domains with mixed-case or uppercase characters. [4]","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.0.169':60 '1':71 '4':72 'abus':41 'address':20,36 'applic':27 'block':30 'blocklist':79 'chang':62 'collect':13 'conscious':45 'current':57 'design':24 'dispos':1,6,16,67,74 'disposable-email-domain':5,66 'domain':3,8,21,69 'email':2,7,19,35,68,73,77 'help':26 'identifi':28 'interact':33 'known':15 'librari':10 'list':51 'often':37 'period':53 'prevent':82 'primari':65 'privaci':44 'privacy-consci':43 'project':70 'provid':11 'python':9 'reflect':61 'registr':31 'sign':48 'sign-up':47 'spam':40,81 'spam-prevent':80 'temporari':18,46,76 'temporary-email':75 'up':49 'updat':54 'use':38 'valid':78 'version':58","created_at":"2026-04-11T01:29:34.623607+00:00","updated_at":"2026-04-16T14:26:28.890691+00:00","problems":[{"fix":"Install the library using pip: `pip install disposable-email-domains`","cause":"The `disposable-email-domains` library has not been installed in your Python environment or is not accessible.","error":"ModuleNotFoundError: No module named 'disposable_email_domains'"},{"fix":"Import the `blocklist` set and use the `in` operator for checking: `from disposable_email_domains import blocklist; domain_to_check = 'example.com'; is_disposable = domain_to_check.lower() in blocklist`","cause":"Developers often expect a function like `is_disposable` to check if a domain is disposable, but this library provides a Python `set` named `blocklist` for direct domain lookup.","error":"AttributeError: module 'disposable_email_domains' has no attribute 'is_disposable'"},{"fix":"Access the `blocklist` set and perform a case-insensitive check directly: `from disposable_email_domains import blocklist; email_domain = 'TestMail.com'; if email_domain.lower() in blocklist: print('Disposable domain detected.')`","cause":"Similar to `is_disposable`, users might attempt to call a `check` method which does not exist in the `disposable-email-domains` library. The library exposes a `set` named `blocklist` for direct domain comparisons.","error":"AttributeError: module 'disposable_email_domains' has no attribute 'check'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.0.246","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/disposable-email-domains/disposable-email-domains","docs":null,"changelog":null,"pypi":"https://pypi.org/project/disposable-email-domains/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["auth-security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-28","next_check":"2026-07-28","install_tag":null}}