Skip to main content

Disposable Mail Checker

A simple Python library to check if an email address uses a disposable domain.

Installation

You can install the package using pip:

pip install disposable-mail-checker

Import

from disposable_mail_checker import is_disposable_mail

Check if an email address uses a disposable domain

is_disposable = is_disposable_mail("example@disposable.com")

if is_disposable:
    print("The email address uses a disposable domain.")
else:
    print("The email address does not use a disposable domain.")

You can also provide an optional list of additional disposable domains and an override flag:

other_disposable_domains = ["example-domain.com", "another-disposable.net"]
is_disposable = is_disposable_mail("user@example-domain.com", other_disposable_domains, override=True)

When the override flag is set to True, the function will exclusively use the provided other_disposable_domains list for checking disposable domains. This means that the default list of disposable domains included with the package will not be considered in the check. If override is False (or not provided), the other_disposable_domains list will be appended to the default list for checking.

Contributing

Contributions are welcome! If you find a bug or want to add a new feature, please create an issue or submit a pull request on the GitHub repository.

If you come across a disposable domain that is not in the current list and would like to contribute, you can generate a pull request with the new domain to be considered for inclusion. Follow these steps:

  1. Fork the repository on GitHub.
  2. Open the disposable_domains.json file in the disposable-mail-checker folder.
  3. Add the new disposable domain to the JSON array. Make sure to follow the JSON format.
  4. Create a pull request to the main branch of the original repository.
  5. Your contribution will be reviewed and, if approved, merged into the main repository.

Thank you for helping to improve the library and its list of disposable domains!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

The list of disposable domains used by this library is based on disposable-email-domains by Ilya Volodarsky.

Note

Make sure to replace "example@disposable.com" with a real example email address for your usage instructions.

Metadata

Release files for disposable-mail-checker 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for disposable-mail-checker 1.0
File Size Uploaded
disposable-mail-checker-1.0.0.tar.gz 713.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for disposable-mail-checker 1.0
File Interpreter ABI Platform
disposable_mail_checker-1.0.0-py3-none-any.whl Python 3 none any Details
disposable_mail_checker-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.1 MB

Release files / disposable-mail-checker-1.0.0.tar.gz

Download URL disposable-mail-checker-1.0.0.tar.gz
Size 713.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5b82216a555eb5d5c7511f34e0b74b92b69f752d0b76b71ddc3217b8aa5c5d3c
BLAKE2b-256 checksum
How to use checksums
345b55732c36bc0a5dd36e8cfe180d0e9cb4370c677f5f0fe059a36fe29f7b50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / disposable_mail_checker-1.0.0-py3-none-any.whl

Download URL disposable_mail_checker-1.0.0-py3-none-any.whl
Size 714.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d2a4d38a9566bec8f54ef1f2a552ba9c6f90138f2aa555b8f4f75414976a53c
BLAKE2b-256 checksum
How to use checksums
3a1000fd70e1554f7a10178777569e7b38d488b233feaa262df2b533b1089989
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / disposable_mail_checker-1.0-py3-none-any.whl

Download URL disposable_mail_checker-1.0-py3-none-any.whl
Size 714.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
083c9eaf8cfcf5b2dc07d6b642aa9a07463f8be5a27c38dce9cd3c3b8d4c9803
BLAKE2b-256 checksum
How to use checksums
160fb7bcf24972cf09fa2f19360f74852a1de13355a4cea7d7968dba9af2d930
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0 This release

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page