Add check deliverability option to validate email tool
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Add check deliverability option to validate email tool
|
||||
* Add support for AGE to SQLite backend
|
||||
* Add button to mark notification as read
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ Email
|
||||
Return a string suitable for an :rfc:`2822` ``From``, ``To`` or ``Cc``
|
||||
header.
|
||||
|
||||
.. function:: validate_email(email)
|
||||
.. function:: validate_email(email[, check_deliverability])
|
||||
|
||||
Validate the email address.
|
||||
Validate the email address and check deliverability.
|
||||
|
||||
.. function:: normalize_email(email)
|
||||
|
||||
|
||||
@@ -49,9 +49,9 @@ try:
|
||||
else:
|
||||
raise
|
||||
|
||||
def validate_email(email):
|
||||
def validate_email(email, check_deliverability=True):
|
||||
emailinfo = _validate_email(
|
||||
email, check_deliverability=True,
|
||||
email, check_deliverability=check_deliverability,
|
||||
dns_resolver=resolver,
|
||||
test_environment=Pool.test)
|
||||
return emailinfo.normalized
|
||||
@@ -76,7 +76,7 @@ try:
|
||||
|
||||
except ImportError:
|
||||
|
||||
def validate_email(email):
|
||||
def validate_email(email, check_deliverability=True):
|
||||
return email
|
||||
|
||||
def normalize_email(email):
|
||||
|
||||
Reference in New Issue
Block a user