def open(self, host = '', port = imaplib.IMAP4_PORT):
imaplibutil.new_open(self, host, port)
-class UsefulIMAP4_SSL(UsefulIMAPMixIn, imaplib.IMAP4_SSL):
+class UsefulIMAP4_SSL(UsefulIMAPMixIn, imaplibutil.WrappedIMAP4_SSL):
def open(self, host = '', port = imaplib.IMAP4_SSL_PORT):
imaplibutil.new_open_ssl(self, host, port)
self.username = username
self.password = password
self.passworderror = None
+ self.goodpassword = None
self.hostname = hostname
self.tunnel = tunnel
self.port = port
self.reference = reference
def getpassword(self):
+ if self.goodpassword != None:
+ return self.goodpassword
+
if self.password != None and self.passworderror == None:
return self.password
self.plainauth(imapobj)
# Would bail by here if there was a failure.
success = 1
+ self.goodpassword = self.password
except imapobj.error, val:
self.passworderror = str(val)
self.password = None