Kleies Utility programm für unsere Email verwaltung
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
945 B

import codecs
2 years ago
from mail_util import checkFor_unkownContacts, sendEmails, jsonAddContacts
2 years ago
from chatbot import sendMessage
from config import today, yesterday
def getResponseText():
with open('responses/bookingResponse.txt', 'r') as file:
data = file.read()
return data
contacts = checkFor_unkownContacts()
2 years ago
#contacts.append('e.neug@icloud.com')
responseText = getResponseText()
print(responseText)
2 years ago
sendEmails(responseText, contacts)
jsonAddContacts(contacts)
chatTextIntro = f"Hey! ich wurde Heute ({today}) ausgeführt und suche für Gestern({yesterday}) nach neuen Kontakten auf der booking@"
chatTextAmmount = f"Ich habe {len(contacts)} neue Kontakte gefunden und automatisch geschrieben"
2 years ago
chatTextNone = f"Ich habe keine neuen Kontakte gefunden"
sendMessage(chatTextIntro)
2 years ago
if len(contacts) > 0:
2 years ago
sendMessage(chatTextAmmount)
2 years ago
for c in contacts:
2 years ago
sendMessage(c)
2 years ago
2 years ago
else:
sendMessage(chatTextNone)