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.
 
 

29 lines
945 B

import codecs
from mail_util import checkFor_unkownContacts, sendEmails, jsonAddContacts
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()
#contacts.append('e.neug@icloud.com')
responseText = getResponseText()
print(responseText)
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"
chatTextNone = f"Ich habe keine neuen Kontakte gefunden"
sendMessage(chatTextIntro)
if len(contacts) > 0:
sendMessage(chatTextAmmount)
for c in contacts:
sendMessage(c)
else:
sendMessage(chatTextNone)