def autodiscover(self):
self.state += 1
if self.state in AutoDiscover.AD_REQUESTS:
print "Making request to",AutoDiscover.AD_REQUESTS[self.state]%self.email_domain
body = AutoDiscoveryProducer(self.email)
d = self.agent.request(
'GET',
AutoDiscover.AD_REQUESTS[self.state]%self.email_domain,
Headers({'User-Agent': ['python-EAS-Client %s'%version]}),
body)
d.addCallback(self.autodiscover_response)
d.addErrback(self.autodiscover_error)
return d
else:
raise Exception("Unsupported state",str(self.state))
评论列表
文章目录