add sina email support
This commit is contained in:
@@ -19,12 +19,14 @@ from datetime import time
|
||||
AOL_IMAP_SERVER = "imap.aol.com"
|
||||
YAHOO_IMAP_SERVER = "imap.mail.yahoo.com"
|
||||
IMAP_SERVER_163 = "imap.163.com"
|
||||
IMAP_SERVER_SINA = "imap.sina.com"
|
||||
VALIDATION_URL_SUBJECT_fr = 'Validation de votre demande de rendez-vous'
|
||||
VALIDATION_URL_SUBJECT_EN = 'Please confirm your appointment'
|
||||
VALIDATION_URL_REGEX = """https:\/\/rendezvousparis.hermes.com\/client\/register\/[A-Z0-9]+\/validate.code=[A-Z0-9]+"""
|
||||
HERMES_EMAIL = "no-reply@hermes.com"
|
||||
|
||||
DOMAIN_163 = "163.com"
|
||||
DOMAIN_SINA = "sina.com"
|
||||
DOMAIN_YAHOO = "yahoo.com"
|
||||
date_format = "%d-%b-%Y" # DD-Mon-YYYY e.g., 3-Mar-2014
|
||||
REDIRECTION_MAILS = "appointment2022@aol.com, chenpeijun@aol.com,hongjiang176@aol,ciyuexie@aol.com"
|
||||
@@ -47,6 +49,8 @@ class MailReader():
|
||||
imap = imaplib.IMAP4_SSL(IMAP_SERVER_163)
|
||||
elif DOMAIN_YAHOO in self.login:
|
||||
imap = imaplib.IMAP4_SSL(YAHOO_IMAP_SERVER)
|
||||
elif DOMAIN_SINA in self.login:
|
||||
imap = imaplib.IMAP4_SSL(IMAP_SERVER_SINA)
|
||||
else:
|
||||
imap = imaplib.IMAP4_SSL(AOL_IMAP_SERVER)
|
||||
# authenticate
|
||||
|
||||
Reference in New Issue
Block a user