aboutsummaryrefslogtreecommitdiff
path: root/reminder.py
diff options
context:
space:
mode:
authorMark Powers <mark@marks.kitchen>2020-09-20 01:07:23 +0000
committerMark Powers <mark@marks.kitchen>2020-09-20 01:07:23 +0000
commitb4441232cb2c54e7ab0173a09640eff3828017cd (patch)
tree459d422f093c5de07173469689ecc705a1ef7286 /reminder.py
Initial commit
Diffstat (limited to 'reminder.py')
-rw-r--r--reminder.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/reminder.py b/reminder.py
new file mode 100644
index 0000000..5fd0025
--- /dev/null
+++ b/reminder.py
@@ -0,0 +1,21 @@
+import smtplib
+from email.mime.text import MIMEText
+from email.utils import formatdate
+import sys
+
+import email_helper
+from config import config
+
+def send_reminder():
+ """Sends a reminder email based on the arguments for easy scripting
+ Usage: python3 reminder.py <subject> <body...>
+ """
+
+ name = config["email"]["name"]
+ user = config["email"]["user"]
+ subject = "REMINDER: %s" % sys.argv[1]
+ body = sys.argv[2] if len(sys.argv) > 2 else ""
+ email_helper.send(user, name, user, subject, body)
+
+if __name__ == "__main__":
+ send_reminder()