Skip to main content

Email validator with regex, blacklisted domains and SMTP checking.

Project description


py3-validate-email is a package for Python that check if an email is valid, not blacklisted, properly formatted and really exists.

This module is for Python 3.6 and above!


You can install the package with pip:

pip install py3-validate-email


Basic usage:

from validate_email import validate_email
is_valid = validate_email(email_address='', check_regex=True, check_mx=True, from_address='my@from.addr.ess', helo_host='', smtp_timeout=10, dns_timeout=10, use_blacklist=True)

check_regex will check will the email address has a valid structure and defaults to True

check_mx: check the mx-records and check whether the email actually exists

from_address: the email address the probe will be sent from,

helo_host: the host to use in SMTP HELO when checking for an email,

smtp_timeout: seconds until SMTP timeout

dns_timeout: seconds until DNS timeout

use_blacklist: use the blacklist of domains downloaded from


The package contains an auto-updater for downloading and updating the built-in blacklist.txt. It will run on each module load (and installation), but will try to update the content if the file is older than 5 days, and if the content is not the same that’s already downloaded.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for py3-validate-email, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size py3_validate_email-0.2.0-py3-none-any.whl (9.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size py3-validate-email-0.2.0.tar.gz (7.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page