def imap(usr, pw, host):
socket.setdefaulttimeout(time_out)
usr = usr.lower()
try:
if len(host) < 2:
port = 993
else:
port = int(host[1])
mail = imaplib.IMAP4_SSL(str(host[0]), port)
a = str(mail.login(usr, pw))
return a[2: 4]
except imaplib.IMAP4.error:
return False
except BaseException:
return "Error"
#/-----------------IMAP-------------------------#
#------GETUNKNOWN--HOST--------------------------#
评论列表
文章目录