py3-validate-email

raw JSON →
1.0.5.post2 verified Fri May 01 auth: no python

Email validator that uses regex pattern, blacklisted domain check, and optional SMTP verification to confirm deliverability. Current version 1.0.5.post2. Released sporadically; last release in 2021.

pip install py3-validate-email
error ImportError: No module named 'py3_validate_email'
cause Misimporting due to package name vs module name mismatch.
fix
Run: pip install py3-validate-email then use: from validate_email import validate_email
error TypeError: validate_email() missing 1 required positional argument: 'email_address'
cause Calling validate_email() without arguments in older versions or incorrect signature.
fix
Use: validate_email('user@example.com')
error smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted')
cause SMTP check with invalid credentials for from_domain.
fix
Provide valid from_domain and credentials for SMTP check, or disable smtp_check.
gotcha The import module is 'validate_email', not 'py3_validate_email'.
fix Use 'from validate_email import validate_email'.
deprecated The function signature changed in 1.0.0: default is now regex-only, no SMTP check.
fix Enable SMTP check by passing smtp_check=True.
gotcha If you omit smtp_check, SMTP verification is disabled even if you provide a from_domain.
fix Always pass smtp_check=True if you want SMTP verification.
gotcha False negative possible: Some valid emails may fail SMTP check due to temporary server issues.
fix Use SMTP check as a hint, not a definitive test; implement retries.

Basic usage with default settings (only regex check).

from validate_email import validate_email

is_valid = validate_email('test@example.com')
print(is_valid)