ignore email addresses without an at sign
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
/deadswitch.sqlite3
|
/deadswitch.sqlite3
|
||||||
|
/session.session
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|||||||
4
api1.py
4
api1.py
@@ -65,6 +65,10 @@ def sendSelfTelegram(message):
|
|||||||
|
|
||||||
|
|
||||||
def sendMail(topic,toAddr):
|
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}")
|
print(f"sending mail to {toAddr} for topic {topic}")
|
||||||
port = 25
|
port = 25
|
||||||
server=smtplib.SMTP("localhost", port)
|
server=smtplib.SMTP("localhost", port)
|
||||||
|
|||||||
BIN
session.session
BIN
session.session
Binary file not shown.
Reference in New Issue
Block a user