Final tweaks

This commit is contained in:
Deadswitch
2020-10-29 18:24:01 -05:00
parent 28749be207
commit db6fb443d1

View File

@@ -31,10 +31,7 @@ def sendMail(topic,toAddr):
server=smtplib.SMTP("localhost", port)
sender_email = "deadswitch@kawomi.com"
receiver_email = "joerg.tretter@gmail.com"
message = f"""\
Subject: deadSwitch not pushed on topic {topic}
Notification of deadSwitch not pushed on topic {topic}."""
message = f"""Subject: deadSwitch not pushed on topic {topic}\n\nNotification of deadSwitch not pushed on topic {topic}."""
server.sendmail(sender_email, receiver_email, message)
@@ -82,7 +79,7 @@ if __name__ == '__main__':
Examples:
<ul>
<li>curl "https://deadswitch.kawomi.com/api/v1?topic=sys.demo"</li>
<li>curl -X POST "https://deadswitch.kawomi.com/api/v1?topic=sys.demo&secs=60&email=demo@gmail.com"</li>
<li>curl -d "" -X POST "https://deadswitch.kawomi.com/api/v1?topic=sys.demo&secs=60&email=demo@demo.com"</li>
</ul>"""
@@ -130,4 +127,4 @@ if __name__ == '__main__':
return jsonify({'success':True, 'expiry':expiryDateTime.strftime("%Y-%m-%d %H:%M:%S"), 'email':email})
app.run(use_reloader=False)
app.run(use_reloader=False,port=5123)