diff --git a/src/contacts/__init__.py b/src/contacts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/mail/mail_reader.py b/src/mail/mail_reader.py index d4c1dd1..13e352d 100755 --- a/src/mail/mail_reader.py +++ b/src/mail/mail_reader.py @@ -16,7 +16,7 @@ from src.pojo.mail.mail_pojo import MailPojo, MailAddress from src.utils.excel_reader import ExcelHelper from src.utils.timeutiles import is_time_between -VALIDATION_URL_SUBJECT_fr = 'Validation de votre demande de rendez-vous' +VALIDATION_URL_SUBJECT_fr = 'Votre demande de rendez-vous' VALIDATION_URL_SUBJECT_EN = 'Please confirm your appointment request' VALIDATION_URL_REGEX = """https:\/\/rendezvousparis.hermes.com\/client\/register\/[A-Z0-9]+\/validate.code=[A-Z0-9]+""" PART_VALIDATION_URL_REGEX = """client\/register\/[A-Z0-9]+\/validate.code=[A-Z0-9]+""" @@ -167,7 +167,7 @@ class MailReader(): body = body + part.get_payload(decode=True).decode("utf-8") elif part.get_content_type() == "text/plain": body = body + part.get_payload() - if VALIDATION_URL_SUBJECT_fr in subject or VALIDATION_URL_SUBJECT_EN in subject or "Validation=20de=20votre=20demande=20de=20rendez-vous" in subject: + if VALIDATION_URL_SUBJECT_fr in subject or VALIDATION_URL_SUBJECT_EN in subject or "Votre=20demande=20de=20rendez-vous" in subject: mail = MailPojo(subject=subject, body=body, from_address=from_address) mail.isImapClient = True print("email is {}".format(self.login))