add method to check mail existence

This commit is contained in:
2023-07-19 00:40:55 +02:00
parent 0a6f458d20
commit 4dffcbd3db
2 changed files with 26 additions and 8 deletions
+16
View File
@@ -0,0 +1,16 @@
from src.db.mongo_manager import MONGO_STORE_MANAGER
from src.utils.excel_reader import ExcelHelper
if __name__ == '__main__':
excel_reader = ExcelHelper()
contacts = excel_reader.read_contacts("/Users/lpan/Desktop/yahoo_aol.xlsx")
mail_list = MONGO_STORE_MANAGER.get_destination_emails()
print("mail_list size is " + str(len(mail_list)))
mail_raw_list =[]
for mail_address in mail_list:
mail_raw_list.append(mail_address.mail)
for contact in contacts:
if contact.mail not in mail_raw_list:
if "gmail" not in contact.mail:
print(contact.mail)