From c4a4480ed00fe62ae02e086d1c159da4ca2522fc Mon Sep 17 00:00:00 2001 From: cdmichaelb Date: Mon, 7 Mar 2022 14:41:50 -0800 Subject: [PATCH] included by mistake --- Code/Michael/Python/email_test.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 Code/Michael/Python/email_test.py diff --git a/Code/Michael/Python/email_test.py b/Code/Michael/Python/email_test.py deleted file mode 100644 index 7f6c5b1d..00000000 --- a/Code/Michael/Python/email_test.py +++ /dev/null @@ -1,26 +0,0 @@ -from smtplib import SMTP -from email.message import EmailMessage - - -def email_alert(to, subject="Alert", body="Alert!"): - msg = EmailMessage() - msg.set_content(body) - msg["Subject"] = subject - msg["To"] = to - - user = "mrnotifi@gmail.com" - msg["From"] = user - password = "nixqgstknzqcfqig" - port = int(587) - - with SMTP("smtp.gmail.com", port) as server: - server.starttls() - server.login(user, password) - - server.send_message(msg) - - -if __name__ == "__main__": - - print("test") - email_alert("broetjem@gmail.com", "hey", "hello world")