Add no_smtp argument that allows us to validate only mx records witho… #49

Merged
sergeyshevch merged 3 commits from feature/add-no_smtp_argument into master 2021-02-11 16:54:09 +01:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 607ae44ce8 - Show all commits

View File

@ -13,9 +13,9 @@ LOGGER = getLogger(name=__name__)
def validate_email_or_fail(
email_address: str, check_regex: bool = True, check_mx: bool = True,
no_smtp: bool = False, from_address: Optional[str] = None,
helo_host: Optional[str] = None, smtp_timeout: int = 10,
dns_timeout: int = 10, use_blacklist: bool = True, debug: bool = False
from_address: Optional[str] = None, helo_host: Optional[str] = None,
smtp_timeout: int = 10, dns_timeout: int = 10,
use_blacklist: bool = True, debug: bool = False, no_smtp: bool = False,
) -> Optional[bool]:
"""
Return `True` if the email address validation is successful, `None` if the