Registry / auth-security / mailchecker

mailchecker

JSON →
library6.0.21pypypi✓ verified 22d ago

Mailchecker is a cross-language library designed for detecting temporary (disposable/throwaway) email addresses. It prevents users from signing up with such addresses by validating emails against a vast, continuously updated database of known fake email providers. The Python version is actively maintained with frequent updates to its domain list, with version 6.0.20 being the latest stable release.

pip install mailchecker
INSTALL
IMPORT
SIG · MAILCHECKER
M
mailchecker
auth-securitypythonv6.0.21
Install
1.9s avg
Import
38ms
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.0.21 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.040s · 19.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.9s · import 0.036s · 20MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MailChecker
import MailChecker
from MailChecker import MailChecker
The MailChecker object is directly available after `import MailChecker` and its `is_valid` method is a class method. Older versions (pre v3.x) might have required instantiation.

This quickstart demonstrates how to import the `MailChecker` module and use its `is_valid()` method to check various email addresses. It returns `True` if the email is syntactically valid and not on the disposable email domain blacklist, otherwise `False`.

import MailChecker # Check a valid, non-disposable email is_valid_real = MailChecker.is_valid('test@example.com') print(f"'test@example.com' is valid: {is_valid_real}") # Check a disposable email (yopmail.com is a common one) is_valid_temp = MailChecker.is_valid('temp@yopmail.com') print(f"'temp@yopmail.com' is valid: {is_valid_temp}") # Check an invalid format email is_valid_format = MailChecker.is_valid('invalid-email') print(f"'invalid-email' is valid: {is_valid_format}")
Debug
Known issues
breakingThe API for Python was normalized in a major update (between v1.x and v3.x). Previously, you might have instantiated `m = MailChecker.MailChecker()`. The current recommended usage directly calls the class method `MailChecker.is_valid(email)`.
fix
Update your code to directly use `MailChecker.is_valid(email)` after `import MailChecker`.
affects: < 3.0.0
gotchaMailchecker primarily focuses on identifying temporary/disposable email domains and basic email format validation. It does *not* perform full SMTP validation to confirm if a mailbox actually exists or is active. An email might pass `is_valid()` but still not be deliverable.
fix
For comprehensive email deliverability checks, consider combining Mailchecker with a dedicated email validation service or library that performs MX record lookups and SMTP checks (e.g., `email-validator` library for more syntax/domain checks, or an external API for full deliverability).
affects: All versions
gotchaOlder documentation or examples might suggest copying `MailChecker.py` directly into your project. While this might still work for some versions, the recommended and most reliable installation method for the Python package is `pip install mailchecker`.
fix
Always install the library via `pip install mailchecker` to ensure you get the latest official version and proper dependency management.
affects: Early versions, unofficial distributions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'MailChecker'
The 'mailchecker' library (installed as 'mailchecker' via pip) is not found, or the import statement uses an incorrect capitalization for the module name as suggested by some documentation.
fix
First, ensure the library is installed: `pip install mailchecker`. Then, use the documented import: `from MailChecker import MailChecker`.
AttributeError: module 'MailChecker' has no attribute 'MailChecker'
This error occurs when attempting to instantiate a 'MailChecker' object using 'MailChecker.MailChecker()', which is an outdated API call. In version 6.0.20 and later, the 'is_valid' method is directly callable on the imported 'MailChecker' module/object without prior instantiation.
fix
Call the 'is_valid' method directly on the imported 'MailChecker' object: `MailChecker.is_valid('test@example.com')`.
TypeError: is_valid() missing 1 required positional argument: 'email'
The 'is_valid' method was called without providing the email address string it expects as an argument.
fix
Provide the email address as a string argument to the 'is_valid' method: `MailChecker.is_valid('user@example.com')`.
Upgrade
Version history
6.0.21latest on PyPI · released Jul 19, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
10
OpenAI (training)
1
Resources
mailchecker — pip install mailchecker · libregistry