{"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":"en","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,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}