ignore email addresses without an at sign

This commit is contained in:
Deadswitch
2022-06-17 15:47:33 -05:00
parent fe8f240cfc
commit 2f299c96f0
3 changed files with 5 additions and 0 deletions

View File

@@ -65,6 +65,10 @@ def sendSelfTelegram(message):
def sendMail(topic,toAddr):
if not "@" in toAddr:
print(f"not sending mail - {toAddr} not an email-address.")
return false
print(f"sending mail to {toAddr} for topic {topic}")
port = 25
server=smtplib.SMTP("localhost", port)