correction on the read emails

This commit is contained in:
2022-11-05 00:50:19 +01:00
parent cea9783c07
commit b93d40a42f
2 changed files with 9 additions and 8 deletions
+5 -6
View File
@@ -29,7 +29,7 @@ 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"
REDIRECTION_MAILS = "appointment2022@aol.com, chenpeijun@aol.com,hongjiang176@aol.com,ciyuexie@aol.com"
class MailReader():
@@ -152,6 +152,8 @@ def need_to_valid_url(url: str, successful_items) -> bool:
def need_to_check_email(mail: str, successful_items) -> bool:
print("successful_items size is " + str(len(successful_items)))
if mail in REDIRECTION_MAILS:
return True
# return True
for item in successful_items:
if mail in item.email:
@@ -163,10 +165,7 @@ def need_to_check_email(mail: str, successful_items) -> bool:
return True
# if the email has not been booked, we needn't read mails.
# return True
if mail in REDIRECTION_MAILS:
return True
else:
return False
return False
def read_mails():
@@ -174,7 +173,7 @@ def read_mails():
if is_time_between(time(10, 30), time(19, 30)):
# get email address
mail_list = MONGO_STORE_MANAGER.get_destination_emails()
mail_address1 = MailAddress(mail="appointment2022@aol.com", password="gyilpmvyyvlcaviq")
# mail_address1 = MailAddress(mail="appointment2022@aol.com", password="gyilpmvyyvlcaviq")
# # mail_address2 = MailAddress(mail="chenpeijun@aol.com", password="ytifuwguknzifqyb")
# # mail_address2 = MailAddress(mail="sdfgfhgf1986@aol.com", password="fjwcgvhxxlywqfwm")
# # mail_address3 = MailAddress(mail="ciyuexie@aol.com", password="czezlmmyypokdfce")