abstract_api.email_validation package#
Submodules#
Module contents#
- class abstract_api.email_validation.EmailValidation(api_key: str | None = None)[source]#
Bases:
BaseService[EmailValidationResponse]AbstractAPI email validation and verification service.
Used to validate and verify an email address.
- Attributes:
_subdomain: Email validation service subdomain.
- check(email: str, auto_correct: bool | None = False) EmailValidationResponse[source]#
Validates and verifies an email address.
- Args:
email: An email address to be validated and verified. auto_correct: Whether the given email address should be
autocorrected and returned in API response.
- Returns:
EmailValidationResponse representing API call response.
- class abstract_api.email_validation.EmailValidationResponse(response: Response)[source]#
Bases:
JSONResponseEmail validation service response.
- property autocorrect: str | None#
The auto corrected email.
If a typo has been detected then a suggestion of the correct email (e.g., johnsmith@gmial.com => johnsmith@gmail.com) is returned. If no typo is detected then this is empty. Auto correction doesn’t happen if ‘auto_correct’ parameter was set to false.
- property deliverability: str | None#
Abstract’s evaluation of the deliverability of the email.
Possible values are: DELIVERABLE, UNDELIVERABLE, and UNKNOWN.
- property email: str | None#
The value for “email” that was entered into the request.
- property is_catchall_email: bool | None#
Whether the domain is configured to catch all email.
- property is_disposable_email: bool | None#
Whether the email is disposable.
True if the email’s domain is found among Abstract’s list of disposable email providers (e.g., Mailinator, Yopmail, etc.).
- property is_free_email: bool | None#
Whether email’s domain is a free to use email.
True if email domain is found among Abstract’s list of free email providers (Gmail, Yahoo, etc.).
- property is_mx_found: bool | None#
Whether MX Records for the domain can be found.
Only available on AbstractAPI paid plans. Will return null and UNKNOWN on free plans.
- property is_role_email: bool | None#
Whether the email represents a role and not an individual.
True if the email’s local part (e.g., the “to” part) appears to be for a role rather than individual. Examples of this include “team@”, “sales@”, “info@”, etc.
- property is_smtp_valid: bool | None#
Whether the SMTP check of the email was successful.
If the check fails, but other checks are valid, the email will be returned as UNKNOWN. AbstractAPI recommends not blocking signups or form submissions when an SMTP check fails.
- property is_valid_format: bool | None#
Whether the email follows the format of “address @ domain . TLD”.
If any of those elements are missing or if they contain extra or incorrect special characters, then it returns false.
- property quality_score: float | None#
Decimal score for quality and deliverability of the submitted email.
It is between 0.01 and 0.99 reflecting AbstractAPI’s confidence in the quality and deliverability of the submitted email.