validate_email is a package for Python that check if an email is valid, properly formatted and really exists (connecting to the server and "asking")
First, you must do:
pip install validate_email
For check the domain mx and verify email exits you must have the pyDNS package installed:
pip install pyDNS
Basic usage:
from validate_email import validate_email is_valid = validate_email('[email protected]')
For check if the host has SMPT Server
from validate_email import validate_email is_valid = validate_email('[email protected]',mx=True)
Check if the host has SMPT Server and the email exists in the server.
from validate_email import validate_email is_valid = validate_email('[email protected]',verify=True)