Release 1.0.7, fixes #95
This commit is contained in:
parent
5f406473eb
commit
69be4f4b9c
|
@ -1,3 +1,6 @@
|
||||||
|
1.0.7:
|
||||||
|
- Handle STARTTLS timeouts: https://gitea.ksol.io/karolyi/py3-validate-email/issues/95
|
||||||
|
|
||||||
1.0.6:
|
1.0.6:
|
||||||
- Add the option to exclusively use certain address schemas (IPv4/IPV6)
|
- Add the option to exclusively use certain address schemas (IPv4/IPV6)
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,8 @@ Basic usage:
|
||||||
smtp_from_address='my@from.addr.ess',
|
smtp_from_address='my@from.addr.ess',
|
||||||
smtp_skip_tls=False,
|
smtp_skip_tls=False,
|
||||||
smtp_tls_context=None,
|
smtp_tls_context=None,
|
||||||
smtp_debug=False)
|
smtp_debug=False,
|
||||||
|
address_types=frozenset([IPv4Address, IPv6Address]))
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
@ -58,7 +59,7 @@ Basic usage:
|
||||||
|
|
||||||
`smtp_debug`: activate smtplib's debug output which always goes to stderr; defaults to `False`
|
`smtp_debug`: activate smtplib's debug output which always goes to stderr; defaults to `False`
|
||||||
|
|
||||||
`address_types`: The IP address types to use. pass a `frozenset` if you want to change the default `frozenset([IPv6Address, IPv4Address])`. Useful when you only deliver emails through one interface, but you have dual stack. For an explanation, see [this issue](https://gitea.ksol.io/karolyi/py3-validate-email/issues/94)
|
`address_types`: The IP address types to use. pass a `frozenset` if you want to change the default `frozenset([IPv6Address, IPv4Address])`. Useful when you only deliver emails through one interface, but you have dual stack. For a detailed explanation, see [this issue](https://gitea.ksol.io/karolyi/py3-validate-email/issues/94).
|
||||||
|
|
||||||
### Result
|
### Result
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -57,7 +57,7 @@ class BuildPyCommand(build_py):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='py3-validate-email',
|
name='py3-validate-email',
|
||||||
version='1.0.6',
|
version='1.0.7',
|
||||||
packages=find_packages(exclude=['tests']),
|
packages=find_packages(exclude=['tests']),
|
||||||
install_requires=['dnspython~=2.2', 'idna~=3.3', 'filelock~=3.7'],
|
install_requires=['dnspython~=2.2', 'idna~=3.3', 'filelock~=3.7'],
|
||||||
author='László Károlyi',
|
author='László Károlyi',
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
from smtplib import (
|
from smtplib import (
|
||||||
SMTP, SMTPNotSupportedError, SMTPResponseException, SMTPServerDisconnected)
|
SMTP, SMTPNotSupportedError, SMTPResponseException, SMTPServerDisconnected)
|
||||||
|
from socket import timeout
|
||||||
from ssl import SSLContext, SSLError
|
from ssl import SSLContext, SSLError
|
||||||
from typing import List, Optional, Tuple
|
from typing import List, Optional, Tuple
|
||||||
|
|
||||||
|
@ -91,7 +92,7 @@ class _SMTPChecker(SMTP):
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
# SSL/TLS support is not available to your Python interpreter
|
# SSL/TLS support is not available to your Python interpreter
|
||||||
pass
|
pass
|
||||||
except SSLError as exc:
|
except (SSLError, timeout) as exc:
|
||||||
raise TLSNegotiationError(exc)
|
raise TLSNegotiationError(exc)
|
||||||
|
|
||||||
def mail(self, sender: str, options: tuple = ()):
|
def mail(self, sender: str, options: tuple = ()):
|
||||||
|
|
Loading…
Reference in New Issue