Small formatting and doc tweaks

This commit is contained in:
Reinhard Müller 2021-03-14 13:24:24 +01:00
parent cd47b2ef66
commit dbd0c1285d
3 changed files with 18 additions and 17 deletions

13
FAQ.md
View File

@ -62,9 +62,10 @@ This module, however, directly talks to the *recipient's* server for
*incoming* emails, so neither your credentials nor the switch to port
465 or 587 is of any use here.
If your internet connection is within a dynamic range (often the case
for private use) or it doesn't have a proper reverse DNS entry, the
servers for many email domains will reject connections from you. This
can *not* be solved by using your provider's mail server. Instead, you
have to use the library on a machine with an internet connection with
static IP address and a proper reverse DNS entry.
If your internet connection is within an IP pool (often the case for
private use) or it doesn't have a proper reverse DNS entry, the servers
for many email domains (depending on their configuration) will reject
connections from you. This can *not* be solved by using your provider's
mail server. Instead, you have to use the library on a machine with an
internet connection with static IP address and a proper reverse DNS
entry.

View File

@ -175,8 +175,8 @@ class _SMTPChecker(SMTP):
def smtp_check(
email_address: EmailAddress, mx_records: List[str],
timeout: float = 10, helo_host: Optional[str] = None,
email_address: EmailAddress, mx_records: List[str], timeout: float = 10,
helo_host: Optional[str] = None,
from_address: Optional[EmailAddress] = None, debug: bool = False
) -> bool:
"""

View File

@ -43,7 +43,7 @@ def validate_email_or_fail(
regex_check(email_address=email_address)
if check_blacklist:
domainlist_check(email_address=email_address)
if not (check_dns or check_smtp): # check_smtp implies check_dns.
if not check_dns and not check_smtp: # check_smtp implies check_dns.
return True
mx_records = dns_check(email_address=email_address, timeout=dns_timeout)
if not check_smtp: