read hotmail after appointment request

This commit is contained in:
2025-06-28 11:14:56 +02:00
parent 3a2983a932
commit 62cdb55da2
5 changed files with 90 additions and 7 deletions
@@ -7,6 +7,7 @@ import time
import pika
from db.mongo_manager import MONGO_STORE_MANAGER
from mail.lan_mail_helper import check_mail
from mail.mail_reader_all_contacts import find_links_to_validate_from_mail_list
from models.ReserveResultPojo import ReserveResultPojo
from models.contact_pojo import ContactPojo
@@ -62,6 +63,13 @@ def is_open():
return is_time_between(datetime.time(10, 30), datetime.time(19, 00))
def check_ms_mails(_mail_list_filtered):
print("check_ms_mails() called.")
for _mail in _mail_list_filtered:
if "outlook.com" in _mail.mail or "hotmail.com" in _mail.mail:
check_mail(_mail.mail)
class AppointmentRequestSender(threading.Thread):
def __init__(self, sub_contact_list: list, logger, cookiesPublisher: CookiesPublisher,
bakeUpCookiesPublisher: CookiesPublisher,
@@ -252,6 +260,7 @@ class AppointmentRequestSender(threading.Thread):
self.logger.info("will get mail from " + mail.mail)
_mail_list_filtered.append(mail)
self.logger.info("will call find_links_to_validate_from_mail_list, size = " + str(len(_mail_list_filtered)))
check_ms_mails(_mail_list_filtered)
find_links_to_validate_from_mail_list(_mail_list_filtered, self.logger)
self.already_read_emails = True
else: