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 mailcheckerVerified import paths — ran on the pinned version, not inferred.
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`.
Update your code to directly use `MailChecker.is_valid(email)` after `import MailChecker`.
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).
Always install the library via `pip install mailchecker` to ensure you get the latest official version and proper dependency management.
First, ensure the library is installed: `pip install mailchecker`. Then, use the documented import: `from MailChecker import MailChecker`.
Call the 'is_valid' method directly on the imported 'MailChecker' object: `MailChecker.is_valid('test@example.com')`.Provide the email address as a string argument to the 'is_valid' method: `MailChecker.is_valid('user@example.com')`.No dependency data recorded yet.