Check if an email address uses a disposable domain
Project description
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:
- Fork the repository on GitHub.
- Open the
disposable_domains.json
file in thedisposable-mail-checker
folder. - Add the new disposable domain to the JSON array. Make sure to follow the JSON format.
- Create a pull request to the
main
branch of the original repository. - 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for disposable-mail-checker-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b82216a555eb5d5c7511f34e0b74b92b69f752d0b76b71ddc3217b8aa5c5d3c |
|
MD5 | b8b00db7b47fd237937925f169a3b115 |
|
BLAKE2b-256 | 345b55732c36bc0a5dd36e8cfe180d0e9cb4370c677f5f0fe059a36fe29f7b50 |
Hashes for disposable_mail_checker-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d2a4d38a9566bec8f54ef1f2a552ba9c6f90138f2aa555b8f4f75414976a53c |
|
MD5 | 1a1af2f65e58f12844a25a401083ff78 |
|
BLAKE2b-256 | 3a1000fd70e1554f7a10178777569e7b38d488b233feaa262df2b533b1089989 |
Hashes for disposable_mail_checker-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 083c9eaf8cfcf5b2dc07d6b642aa9a07463f8be5a27c38dce9cd3c3b8d4c9803 |
|
MD5 | abda3357153e6f624575bb4eb164f3be |
|
BLAKE2b-256 | 160fb7bcf24972cf09fa2f19360f74852a1de13355a4cea7d7968dba9af2d930 |