alexus
alexus

Reputation: 7465

PyDNS & DNS timeout error

Per validate_email 1.3 : Python Package Index, in order to check the domain mx and verify email exits, I must have the pyDNS package installed.

How do I set my own name service (DNS) instead of system one as I'm getting timeout otherwise...

Upvotes: 2

Views: 1441

Answers (1)

Robᵩ
Robᵩ

Reputation: 168606

Here is how you would set your DNS server to, for example, Google's public DNS server:

from validate_email import validate_email
import DNS
DNS.defaults['server']=['8.8.8.8', '8.8.4.4']

print validate_email('[email protected]', check_mx=True)

Upvotes: 6

Related Questions