add support for gmx.ch

This commit is contained in:
2023-11-11 13:52:14 +01:00
parent 4baf44e285
commit 7b82af925e
+6 -5
View File
@@ -16,6 +16,7 @@ DOMAN_GMAIL = "gmail.com"
DOMAIN_GMX = "gmx.com"
DOMAIN_GMX_FR = "gmx.fr"
DOMAIN_GMX_US = "gmx.us"
DOMAIN_GMX_CH = "gmx.ch"
DOMAIN_ONET = "onet.pl"
DOMAIN_NAVER = "naver.com"
DOMAIN_INBOX_LV = "inbox.lv"
@@ -25,8 +26,8 @@ DOMAIN_INCEL_EMAIL = "incel.email"
DOMAIN_SHITPOSTING_EXPERT = "shitposting.expert"
DOMAIN_HATESJE_WS = "hatesje.ws"
DOMAIN_CHILD_PIZZA = "child.pizza"
DOMAIN_GENOCIDE_FUN= "genocide.fun"
DOMAIN_DMC_CHAT= "dmc.chat"
DOMAIN_GENOCIDE_FUN = "genocide.fun"
DOMAIN_DMC_CHAT = "dmc.chat"
AOL_IMAP_SERVER = "imap.aol.com"
IMAP_SERVER_163 = "imap.163.com"
@@ -52,9 +53,9 @@ def show_folders(imap) -> list:
if not isImapClient:
for i in imap.list()[1]:
l = i.decode().split(' "/" ')
if len(l)>1:
if len(l) > 1:
folders.append(l[1])
if len(folders)==0:
if len(folders) == 0:
folders.append('INBOX')
return folders
else:
@@ -71,7 +72,7 @@ def create_imap(login: str):
imap = IMAPClient(IMAP_SERVER_163, use_uid=True)
elif DOMAIN_YAHOO in login:
imap = imaplib.IMAP4_SSL(YAHOO_IMAP_SERVER)
elif DOMAIN_GMX in login or DOMAIN_GMX_FR in login or DOMAIN_GMX_US in login:
elif DOMAIN_GMX in login or DOMAIN_GMX_FR in login or DOMAIN_GMX_US in login or DOMAIN_GMX_CH in login:
imap = imaplib.IMAP4_SSL(SERVER_GMX)
elif DOMAIN_SINA in login:
# imap = imaplib.IMAP4_SSL(IMAP_SERVER_SINA)