new method to extract names
This commit is contained in:
@@ -13,7 +13,9 @@ from src.db.mongo_manager import MONGO_STORE_MANAGER
|
||||
from src.logs.AppLogging import init_logger
|
||||
from src.mail.mail_constants import DOMAIN_HOTMAIL, create_imap
|
||||
from src.pojo.mail.mail_pojo import MailPojo, MailAddress
|
||||
from src.utils.excel_reader import ExcelHelper
|
||||
from src.utils.timeutiles import is_time_between
|
||||
from src.workers.link_validator import LinkValidator
|
||||
|
||||
VALIDATION_URL_SUBJECT_fr = 'Validation de votre demande de rendez-vous'
|
||||
VALIDATION_URL_SUBJECT_EN = 'Please confirm your appointment request'
|
||||
@@ -87,9 +89,9 @@ class MailReader():
|
||||
folder=folder))
|
||||
else:
|
||||
mail_list.extend(self._get_messages_from_folder_for_imapclient(imap))
|
||||
if DOMAIN_HOTMAIL in self.login:
|
||||
mail_list.extend(
|
||||
self._get_messages_from_folder_for_imapclient(imap, folder="Junk"))
|
||||
# if DOMAIN_HOTMAIL in self.login:
|
||||
# mail_list.extend(
|
||||
# self._get_messages_from_folder_for_imapclient(imap, folder="Junk"))
|
||||
if not isImapClient:
|
||||
imap.close()
|
||||
imap.logout()
|
||||
@@ -245,8 +247,10 @@ def read_mails():
|
||||
if is_time_between(time(7, 30), time(19, 30)):
|
||||
# get email address
|
||||
mail_list = MONGO_STORE_MANAGER.get_destination_emails()
|
||||
# excel_reader = ExcelHelper()
|
||||
# mail_list =excel_reader.read_email_pojo(file_name="/Users/lpan/Desktop/hotmail_list.xlsx")
|
||||
# mail_address1 = MailAddress(mail="appointment2022@aol.com", password="gyilpmvyyvlcaviq")
|
||||
# mail_address1 = MailAddress(mail="chenpeijun@aol.com", password="ytifuwguknzifqyb")
|
||||
# mail_address1 = MailAddress(mail="sayedyepesv@hotmail.com", password="JGc1UH41")
|
||||
# # mail_address3 = MailAddress(mail="ciyuexie@aol.com", password="czezlmmyypokdfce")
|
||||
# mail_list = [mail_address1]
|
||||
successful_items = MONGO_STORE_MANAGER.get_all_successful_items_for_day()
|
||||
|
||||
Reference in New Issue
Block a user