You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,7 @@ shown):
135
135
136
136
`dns_resolver=None`: Pass an instance of [dns.resolver.Resolver](https://dnspython.readthedocs.io/en/latest/resolver-class.html) to control the DNS resolver including setting a timeout and [a cache](https://dnspython.readthedocs.io/en/latest/resolver-caching.html). The `caching_resolver` function shown above is a helper function to construct a dns.resolver.Resolver with a [LRUCache](https://dnspython.readthedocs.io/en/latest/resolver-caching.html#dns.resolver.LRUCache). Reuse the same resolver instance across calls to `validate_email` to make use of the cache.
137
137
138
+
In non-production test environments, you may want to allow `@test` or `@mycompany.test` email addresses to be used as placeholder email addresses, which would normally not be permitted. In that case, pass `test_environment=True`. DNS-based deliverability checks will be disabled as well. Other [Special Use Domain Names](https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml) are always considered invalid and raise `EmailUndeliverableError`.
138
139
139
140
Internationalized email addresses
140
141
---------------------------------
@@ -340,8 +341,11 @@ strictly conform to the standards. Many email address forms are obsolete
340
341
or likely to cause trouble:
341
342
342
343
* The validator assumes the email address is intended to be
343
-
deliverable on the public Internet using DNS, and so the domain part
344
+
deliverable on the public Internet. The domain part
344
345
of the email address must be a resolvable domain name.
346
+
[Special Use Domain Names](https://www.iana.org/assignments/special-use-domain-names/special-use-domain-names.xhtml)
347
+
and their subdomains are always considered invalid (except see
348
+
the `test_environment` parameter above).
345
349
* The "quoted string" form of the local part of the email address (RFC
346
350
5321 4.1.2) is not permitted --- no one uses this anymore anyway.
347
351
Quoted forms allow multiple @-signs, space characters, and other
('my.λong.address@1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444444444555555555.6666666666777777777788888888889999999999000000000.1111111111222222222233333333334444.info', 'The email address is too long (at least 1 character too many).'),
0 commit comments