We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7e2735 commit 36e639bCopy full SHA for 36e639b
email_alerts/EmailAlert.py
@@ -0,0 +1,15 @@
1
+import smtplib
2
+
3
+def send_email(subject, body, to_email):
4
+ sender_email = "your_email@example.com"
5
+ sender_password = "your_password"
6
7
+ message = f"Subject: {subject}\n\n{body}"
8
9
+ server = smtplib.SMTP('smtp.gmail.com', 587)
10
+ server.starttls()
11
+ server.login(sender_email, sender_password)
12
+ server.sendmail(sender_email, to_email, message)
13
+ server.quit()
14
15
+send_email("Test Alert", "This is an automated email", "recipient@example.com")
0 commit comments