add method to check mail existence
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user