Free Email Domains List
The `free-email-domains` package provides a comprehensive, curated list of free email domains from around the world, designed to simplify checking if an email address belongs to a free email provider. The current version, 1.0.2, was released on February 23, 2026, and is actively maintained with updates based on data from sources like HubSpot.
Warnings
- gotcha This library only provides a list of common free email domains. It does NOT perform email address validation (e.g., checking for valid format, existence of domain, or deliverability) nor does it detect disposable/temporary email addresses, which are a different category of service.
- gotcha The `whitelist` is a curated list, primarily leveraging data from HubSpot. While comprehensive, it may not include every single free email provider globally, and new providers may emerge faster than the list is updated.
- gotcha For applications with high security requirements (e.g., user account systems), simply identifying a domain as 'not free' is insufficient for security. Domains can expire and be re-registered by malicious actors ('domain resurrection attacks'), potentially leading to account takeovers, as highlighted by PyPI's own security measures.
Install
-
pip install free-email-domains
Imports
- whitelist
from free_email_domains import whitelist
Quickstart
from free_email_domains import whitelist
def check_email_domain(email_address):
try:
domain = email_address.split('@')[1]
if domain in whitelist:
print(f"'{domain}' is a free email domain.")
else:
print(f"'{domain}' is NOT a free email domain.")
except IndexError:
print(f"Invalid email address format: {email_address}")
check_email_domain("user@gmail.com")
check_email_domain("info@example.com")
check_email_domain("invalid-email")